File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 77 "runtime/debug"
88 "sync"
99
10- "github.com/disgoorg/disgolink/v3/lavalink"
1110 "github.com/disgoorg/snowflake/v2"
11+
12+ "github.com/disgoorg/disgolink/v3/lavalink"
1213)
1314
1415type Client interface {
Original file line number Diff line number Diff line change @@ -153,6 +153,11 @@ func (p *playerImpl) Destroy(ctx context.Context) error {
153153 return err
154154 }
155155
156+ // check if this player already got destroyed
157+ if player := p .lavalink .ExistingPlayer (p .guildID ); player == nil {
158+ return nil
159+ }
160+
156161 p .lavalink .ForPlugins (func (plugin Plugin ) {
157162 if pl , ok := plugin .(PluginEventHandler ); ok {
158163 pl .OnDestroyPlayer (p )
Original file line number Diff line number Diff line change @@ -10,8 +10,9 @@ import (
1010 "net/http"
1111 "net/url"
1212
13- "github.com/disgoorg/disgolink/v3/lavalink"
1413 "github.com/disgoorg/snowflake/v2"
14+
15+ "github.com/disgoorg/disgolink/v3/lavalink"
1516)
1617
1718type Endpoint string
You can’t perform that action at this time.
0 commit comments