【发布时间】:2020-09-30 08:16:32
【问题描述】:
我听说ctx.typing() 存在,但我希望我的机器人在 DM 中显示指示器。到目前为止,这是我的代码:
@client.event
async def on_message(message):
await client.process_commands(message)
# i want the bot to display 'typing...' for 1 second
if message.guild is None and not message.author.bot:
with open('dmresponses.txt') as input_file:
long_list = [line.strip() for line in input_file]
await message.author.send(random.choice(long_list))
我该如何实现?
【问题讨论】:
标签: python python-3.x discord discord.py