【发布时间】:2021-06-26 03:15:51
【问题描述】:
您好,我正在尝试让我的 Bot 从消息中更改其状态,并使用 quick.db 进行设置,因此如果它重新启动,它会变回 sotd。例如,消息类似于:Song of the day: "Wild Reputation" from the Album(s) PWR UP,我只希望歌曲名称作为状态。
client.on('message', message => {
if (message.channel.id === '792250171320434688') {
if (message.author.id === '403657714812715008') {
const ms = message.content
db.set('sotd_', ms)
let so = db.get('sotd_')
client.user.setActivity(so, { type: "PLAYING"})
}
}
});
【问题讨论】:
标签: node.js discord.js quick.db