Lykoss
Decapat
- Katılım
- 23 Mayıs 2021
- Mesajlar
- 957
- Çözümler
- 6
Daha fazla
- Cinsiyet
- Erkek
- Meslek
- Öğrenci
[CODE lang="python" title="A"]import discord
from discord.ext import commands
import random
from webserver import keep_alive
import saas
keep_alive()
Bot = commands.Bot(command_prefix='!m ')
@Bot.event
async def on_ready():
print("Bot çalışıyor." + str(Bot.user))
#------------------------------------------------------------------------
@Bot.command()
async def yardım(msg):
await msg.send('YARDIM')
@Bot.command()
async def musty(msg):
await msg.send('Merhaba ben MusTy')
#temizleme
@Bot.command()
async def temizle(ctx,amount=15):
await ctx.channel.purge(limit=amount)
#zaratma
@Bot.command()
async def zar(msg):
zar = random.randint(1,6)
await msg.send("Zar {} geldi.".format(zar))
#Ders programı
@Bot.command()
async def dersprogramı(msg):
await msg.send('A')
#Ödevler
@Bot.command()
async def ödevler(msg):
await msg.send('A')
#------------------------------------------------------------------------
Bot.run('(TOKEN)')
[/CODE]
[CODE lang="python" title="Sa-as"]import discord
from discord.ext.commands import Bot
TOKEN = "Sansür"
client = discord.Client()
bot = Bot(command_prefix="!m ")
@bot.event
async def on_ready():
print("Bot Hazır " + str(bot.user))
@bot.event
async def on_message(message):
if message.author == client.user:
return
if message.content == ("Sa"):
await message.channel.send("as")
if message.content == ("sa"):
await message.channel.send("as")
bot.run(TOKEN)
[/CODE]
Sınıf Sunucumuz için bir bot yapmıştım. Kullanıcı Sa yazınca As yazmasını istiyorum. Kendim yaptığımda !m komutları çalışmıyor. İkisi de nasıl çalışabilir?
from discord.ext import commands
import random
from webserver import keep_alive
import saas
keep_alive()
Bot = commands.Bot(command_prefix='!m ')
@Bot.event
async def on_ready():
print("Bot çalışıyor." + str(Bot.user))
#------------------------------------------------------------------------
@Bot.command()
async def yardım(msg):
await msg.send('YARDIM')
@Bot.command()
async def musty(msg):
await msg.send('Merhaba ben MusTy')
#temizleme
@Bot.command()
async def temizle(ctx,amount=15):
await ctx.channel.purge(limit=amount)
#zaratma
@Bot.command()
async def zar(msg):
zar = random.randint(1,6)
await msg.send("Zar {} geldi.".format(zar))
#Ders programı
@Bot.command()
async def dersprogramı(msg):
await msg.send('A')
#Ödevler
@Bot.command()
async def ödevler(msg):
await msg.send('A')
#------------------------------------------------------------------------
Bot.run('(TOKEN)')
[/CODE]
[CODE lang="python" title="Sa-as"]import discord
from discord.ext.commands import Bot
TOKEN = "Sansür"
client = discord.Client()
bot = Bot(command_prefix="!m ")
@bot.event
async def on_ready():
print("Bot Hazır " + str(bot.user))
@bot.event
async def on_message(message):
if message.author == client.user:
return
if message.content == ("Sa"):
await message.channel.send("as")
if message.content == ("sa"):
await message.channel.send("as")
bot.run(TOKEN)
[/CODE]
Sınıf Sunucumuz için bir bot yapmıştım. Kullanıcı Sa yazınca As yazmasını istiyorum. Kendim yaptığımda !m komutları çalışmıyor. İkisi de nasıl çalışabilir?
Son düzenleme: