@@ -6,11 +6,11 @@ import (
66 "time"
77
88 "github.com/bwmarrin/discordgo"
9- "github.com/disgoorg/json "
9+ "github.com/disgoorg/omit "
1010 "github.com/disgoorg/snowflake/v2"
1111
12- "github.com/disgoorg/disgolink/v3 /disgolink"
13- "github.com/disgoorg/disgolink/v3 /lavalink"
12+ "github.com/disgoorg/disgolink/v4 /disgolink"
13+ "github.com/disgoorg/disgolink/v4 /lavalink"
1414)
1515
1616func (b * Bot ) shuffle (event * discordgo.InteractionCreate , data discordgo.ApplicationCommandInteractionData ) error {
@@ -235,7 +235,7 @@ func (b *Bot) play(event *discordgo.InteractionCreate, data discordgo.Applicatio
235235 b .Lavalink .BestNode ().LoadTracksHandler (ctx , identifier , disgolink .NewResultHandler (
236236 func (track lavalink.Track ) {
237237 _ , _ = b .Session .InteractionResponseEdit (event .Interaction , & discordgo.WebhookEdit {
238- Content : json .Ptr (fmt .Sprintf ("Loading track: [`%s`](<%s>)" , track .Info .Title , * track .Info .URI )),
238+ Content : omit .Ptr (fmt .Sprintf ("Loading track: [`%s`](<%s>)" , track .Info .Title , * track .Info .URI )),
239239 })
240240 if player .Track () == nil {
241241 toPlay = & track
@@ -245,7 +245,7 @@ func (b *Bot) play(event *discordgo.InteractionCreate, data discordgo.Applicatio
245245 },
246246 func (playlist lavalink.Playlist ) {
247247 _ , _ = b .Session .InteractionResponseEdit (event .Interaction , & discordgo.WebhookEdit {
248- Content : json .Ptr (fmt .Sprintf ("Loaded playlist: `%s` with `%d` tracks" , playlist .Info .Name , len (playlist .Tracks ))),
248+ Content : omit .Ptr (fmt .Sprintf ("Loaded playlist: `%s` with `%d` tracks" , playlist .Info .Name , len (playlist .Tracks ))),
249249 })
250250 if player .Track () == nil {
251251 toPlay = & playlist .Tracks [0 ]
@@ -256,7 +256,7 @@ func (b *Bot) play(event *discordgo.InteractionCreate, data discordgo.Applicatio
256256 },
257257 func (tracks []lavalink.Track ) {
258258 _ , _ = b .Session .InteractionResponseEdit (event .Interaction , & discordgo.WebhookEdit {
259- Content : json .Ptr (fmt .Sprintf ("Loaded search result: [`%s`](<%s>)" , tracks [0 ].Info .Title , * tracks [0 ].Info .URI )),
259+ Content : omit .Ptr (fmt .Sprintf ("Loaded search result: [`%s`](<%s>)" , tracks [0 ].Info .Title , * tracks [0 ].Info .URI )),
260260 })
261261 if player .Track () == nil {
262262 toPlay = & tracks [0 ]
@@ -266,20 +266,20 @@ func (b *Bot) play(event *discordgo.InteractionCreate, data discordgo.Applicatio
266266 },
267267 func () {
268268 _ , _ = b .Session .InteractionResponseEdit (event .Interaction , & discordgo.WebhookEdit {
269- Content : json .Ptr (fmt .Sprintf ("Nothing found for: `%s`" , identifier )),
269+ Content : omit .Ptr (fmt .Sprintf ("Nothing found for: `%s`" , identifier )),
270270 })
271271 },
272272 func (err error ) {
273273 _ , _ = b .Session .InteractionResponseEdit (event .Interaction , & discordgo.WebhookEdit {
274- Content : json .Ptr (fmt .Sprintf ("Error while looking up query: `%s`" , err )),
274+ Content : omit .Ptr (fmt .Sprintf ("Error while looking up query: `%s`" , err )),
275275 })
276276 },
277277 ))
278278 if toPlay == nil {
279279 return nil
280280 }
281281
282- if err : = b .Session .ChannelVoiceJoinManual (event .GuildID , voiceState .ChannelID , false , false ); err != nil {
282+ if err = b .Session .ChannelVoiceJoinManual (event .GuildID , voiceState .ChannelID , false , false ); err != nil {
283283 return err
284284 }
285285
0 commit comments