【发布时间】:2021-04-17 00:41:11
【问题描述】:
每当有人说“狗”时,我想让我的不和谐机器人从一组图像中发送一张随机图像。这是我所拥有的:
@client.event
async def on_message(message):
if message.content.startswith('dog'):
await message.channel.send(file=discord.File(random.choice('dog1.JPG', 'dog2.JPG', 'dog3.JPG')))
它似乎不起作用,有什么想法吗?
【问题讨论】:
标签: python discord.py