Discord机器人可以复制消息链接吗



我想我的机器人会返回过去的消息,并在几天后发送回消息链接。


您可以使用数据库并将消息id和通道id作为记录存储在表中(假设您使用SQL(。然后,当你想再次提取时,只需进行

let channel = await client.channels.fetch('channelid')
let msg = await channel.messages.fetch('messageid')
message.channel.send(msg.url)

或者你可以简单地存储URL,然后只存储message.channel.send('your url')

最新更新