Selam discord botu için discord.py kullanmayi başlamıştım ama en başından beridir şuna bir çözüm bulamadım hata :
@client.command()
^^^^^^^^^^^^^^
AttributeError: 'Client' object has no attribute 'command'
kod:
# bot.py
import os
import discord
from discord import app_commands
from discord.ext import commands
from discord.ext.commands import Bot
client = discord.Client(command_prefix="?", intents = discord.Intents.all())
@client.event
async def on_ready():
print(f'{client.user} has connected to Discord!')
@client.command()
async def help(ctx):
await ctx.reply('''-- bot --
?start --> start bot
?stop --> stop bot
''')
@client.comand()
async def stop(ctx):
await ctx.reply(''' > **closing || Log Out Successfully**''')
client.run(token)
Son düzenleyen: Moderatör: