No, you're attempting to run two instances, one with only intents and another as a bot without intents, you don't need a separate client
and bot
. Just use one:
BOT_PREFIX = ("!")
intents = discord.Intents(members = True, messages = True, guilds = True)
client = commands.Bot(command_prefix = BOT_PREFIX, intents = intents)
client.run(os.getenv('TOKEN'))
Now you can define commands or events with @client.command
or @client.event
. If you'd rather use bot
, then change client
everywhere to bot
, but don't use both.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…