我想制作一个不和谐的机器人来从我们互相解释的不和谐频道中挑选一条随机消息
“某事某事。” -某人,约会。
并将其发布在任何频道中。由于我们已经像这样格式化这些消息,机器人只需要随机选择一个并发布它而不做任何更改。
我想制作一个不和谐的机器人来从我们互相解释的不和谐频道中挑选一条随机消息
“某事某事。” -某人,约会。
并将其发布在任何频道中。由于我们已经像这样格式化这些消息,机器人只需要随机选择一个并发布它而不做任何更改。
你可以得到一个channel'smessages然后选择一个random()1 并使用它的数据来发送报价。
const channel = client.channels.cache.get(CHANNEL_ID) // you can use `message.channel` instead of this variable if you want to get the message from the channel you send the command
const randomMsg = channel.messages.cache.random(1)
message.channel.send(`"${randomMsg.content}" -${message.author}, ${message.createdAt}`)