[CODE lang="python" title="KOD-TÜMÜ"]import discord
from discord.ext import commands
import random
from webserver import keep_alive
client = discord.Client()
keep_alive()
Bot = commands.Bot(command_prefix='!m ')
selam = ["selam","Selam","slm","SELAM"]
@Bot.event
async def on_ready():
print("Bot çalışıyor." + str(Bot.user))
#------------------------------------------------------------------------
@Bot.command()
async def yardım(msg):
await msg.send('A.')
@Bot.event
async def on_message(message):
if message.content.upper() == ("MUSTY"):
await message.channel.send("A")
if message.content.upper() == ("GÜNAYDIN"):
await message.channel.send("Sabah şerifleriniz hayrolsun.")
if message.content.lower() == ("iyi geceler"):
await message.channel.send("İyi geceler,tatlı rüyalar.")
if message.content.upper() == ("SA"):
await message.channel.send("Aleyküm selam hoşgeldiniz.")
await Bot.process_commands(message)
for i in selam:
if i in message.content:
await message.channel.send("Selam.")
break
@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('.jpg')
#Ödevler
@Bot.command()
async def ödevler(msg):
await msg.send('A')
Bot.run("TOKEN")[/CODE]
SA yazınca: