【问题标题】:How to save message object or id of just sent message?如何保存刚刚发送的消息的消息对象或 id?
【发布时间】:2018-11-19 23:01:33
【问题描述】:

我需要保存并保留一个消息对象(?),以便稍后我可以使用该消息做一些事情。 例如在使用时如何保存它:

await client.say("something that i'll change later")

【问题讨论】:

标签: python discord discord.py


【解决方案1】:

刚刚找到解决方案。 您可以将此操作分配给变量:

mymsg = await client.say("something that i'll change later")

稍后使用'edit_message':

await client.edit_message(mymsg,"new text")

【讨论】:

    猜你喜欢
    • 2012-12-19
    • 1970-01-01
    • 2012-01-17
    • 1970-01-01
    • 1970-01-01
    • 2020-01-29
    • 2019-08-30
    • 1970-01-01
    • 2011-11-20
    相关资源
    最近更新 更多