We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a7e4b4 commit a9a9e21Copy full SHA for a9a9e21
1 file changed
plugins/control.rb
@@ -96,13 +96,15 @@ def state_handling_if_alone()
96
if @@bot[:mpd]
97
current = @@bot[:mpd].current_song
98
99
- if current.file.include? "://" #If yes, it is probably some kind of a stream.
100
- @@bot[:mpd].stop
101
- @playing = false
102
- else
103
- if @@bot[:mpd].paused? == false
104
- @@bot[:mpd].pause = true
+ if ! current.nil?
+ if current.file.include? "://" #If yes, it is probably some kind of a stream.
+ @@bot[:mpd].stop
105
@playing = false
+ else
+ if @@bot[:mpd].paused? == false
+ @@bot[:mpd].pause = true
106
+ @playing = false
107
+ end
108
end
109
110
0 commit comments