【发布时间】:2022-01-26 14:29:35
【问题描述】:
我添加了机器人状态,然后 命令不起作用。添加了一个回答者的答案,但它仍然不起作用(帮助不起作用但不是你好;-;)
import discord
from KeepAlive import keep_alive
client=discord.Client()
@client.event
async def on_ready():
await client.change_presence(status=discord.Status.online,activity=discord.Game('Hey There! Do €help to start!'))
print('We have logged in as {0.user}'.format(discord.Client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('$hello'):
await message.channel.send('Hello!')
if message.content.startswith('$help'):
await message.channel.send('no help here!')
await bot.process_commands(message)
keep_alive()
client.run('wont say token :)')
【问题讨论】:
-
你在说什么?您似乎没有像他们在答案中显示的那样添加下划线。
-
您可以尝试启用
intents.message。 -
现在可以使用了。我如何回答问题?
-
@TechGamerExpert 只需单击旁边的复选标记,即可回答解决了您的问题或帮助您解决问题。