【发布时间】:2019-07-13 12:38:38
【问题描述】:
我试图让机器人对命令发送的最后一条消息做出反应,我已经尝试过,但它给了我一个错误 Message Argument must be a Message 此外,我还试图让机器人对带有用户提供的消息 ID 的消息,以下是我尝试做的事情
# (Most important) This should react on the last message with the ???? emoji (Not this message it self)
@client.command(pass_context=True)
async def react(ctx):
Channel=ctx.message.channel
logs = client.logs_from(Channel, limit=1) #This is meant to check the last (1) message
await client.add_reaction(logs, emoji="????")
还有其他脚本
# (Least important) This should react to a message that has the message id you give
@client.command(pass_context=True)
async def like(ctx,Message_id):
message=Message_id
await client.add_reaction(message, emoji="????")
【问题讨论】:
标签: python python-3.x discord discord.py