I'm setting up a new discord bot using the @bot.command()
functionality, however, my !say
command will not take the user's input and then have the bot say it
@bot.command()
async def say(message):
#await bot.delete_message(message)
await bot.send_message(message.channel, message)
This is for a discord server and the bot is to auto admin things for me aswell as provide the discord members functions to use. I've tried:
The expected result is for the bot to "say" the user's message e.g. with !say Hello
the bot would reply with "Hello"
答案 0 :(得分:0)
例如,您必须使用channel.send()
@bot.command()
async def foo(ctx, arg):
await ctx.send(arg)
您可以在以下位置查看更多说明的示例:https://discordpy.readthedocs.io/en/rewrite/ext/commands/commands.html