PYTHON İLE DİSCORD BOTU YAZMAK
Merhaba ben xiorxa,yaklaşık bir yıldır discord botları kodluyorum.
Bugün Size python ile basit bir discord bot nasıl yapılır anlatacağım.
------------------------------------------Kodlar-----------------------------------------------
import discord
from discord.ext import commands #kütüphaneleri dahil ediyoruz.
bot = commands.Bot(command_prefix="deneme!") #prefixi belirliyoruz.
@bot.event
async def on_ready():
print("Bot Hazır")#bot hazır olduğunda ne desin onu belirliyoruz.
@bot.event #oto-cevap bölümü
async def on_message(message):
if message.author == client.user:
return
if message.content == "selam":
await message.channel.send("selam naber")
TOKEN = "Tokeninizi girin."
bot.run(TOKEN)
--------------------------------------Kod Bölümü bitiş-----------------------------------------