- Added new music commands: play, queue, and volume. - Implemented music management using disgolink for Lavalink integration. - Updated bot initialization to include Lavalink host and password. - Enhanced interaction handling for music commands, requiring DJ role for usage. - Introduced now playing message with interactive buttons for controlling playback. - Updated dependencies in go.mod for disgolink and snowflake.
19 lines
514 B
Go
19 lines
514 B
Go
package music
|
|
|
|
import "github.com/bwmarrin/discordgo"
|
|
|
|
func updateNowPlayingButtons(channelID, messageID string, guildID string) {
|
|
if manager == nil || channelID == "" || messageID == "" {
|
|
return
|
|
}
|
|
repeatSong, repeatQueue := repeatFlags(guildID)
|
|
paused, _ := pausedAndVolume(guildID)
|
|
comps := nowPlayingComponents(false, repeatSong, repeatQueue, paused)
|
|
_, _ = manager.session.ChannelMessageEditComplex(&discordgo.MessageEdit{
|
|
Channel: channelID,
|
|
ID: messageID,
|
|
Components: &comps,
|
|
})
|
|
}
|
|
|