Distube没有显示歌曲的名称和请求的用户。不过,它显示了持续时间。知道为什么吗?
代码:
client.distube
.on("playSong", (song) => message.channel.send(
`Playing \`${song.title}\` - \`${song.formattedDuration}\`\nRequested by: ${song.user}`
))输出:

发布于 2021-09-02 08:23:23
在代码这里之后,在播放一首新歌时发出playSong事件,并有三个参数,即
·message (附自discord.js的MessageObject )
·queue (你的歌曲队列)
·song (此参数包含所需的值)
所以在箭头函数侦听器中
client.distube
.on("playSong", (message, queue, song) => { message.channel.send(
`Playing \`${song.title}\` - \`${song.formattedDuration}\`\nRequested by: ${song.user}`
)
});https://stackoverflow.com/questions/69024433
复制相似问题