【问题标题】:Get message ID of the message sent by my bot in python获取我的机器人在 python 中发送的消息的消息 ID
【发布时间】:2021-04-20 15:52:41
【问题描述】:

我想知道如何获取不和谐的机器人发送的消息的消息 ID,而不是已经发送的消息。

【问题讨论】:

  • 欢迎来到 SO Tamari。请您分享您已经尝试过的代码。

标签: python discord discord.py


【解决方案1】:

Messageable.send 返回一个discord.Message 实例,那么您可以简单地使用id 属性

message = await Messageable.send("Whatever") # This can be the context, a channel, a dm channel...
message_id = message.id

参考:

【讨论】:

    猜你喜欢
    • 2019-05-10
    • 2021-03-29
    • 1970-01-01
    • 2020-08-01
    • 1970-01-01
    • 2020-02-26
    • 2023-04-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多