diff --git a/src/modules/commands/download.lua b/src/modules/commands/download.lua index cbe23ff..3f5e020 100644 --- a/src/modules/commands/download.lua +++ b/src/modules/commands/download.lua @@ -43,11 +43,13 @@ commands:Add('sc',{},'download soundcloud song (usage: "sc [link]")', function(t local songName repeat local str = s:read() - local tag = str:match('^%[(.+)%]') - if tag=='soundcloud' then - local song = str:match('^%[soundcloud%] (.+):') - if song:match('%d+')~=song then - songName = song:match('.+/(.+)') + if str then + local tag = str:match('^%[(.+)%]') + if tag=='soundcloud' then + local song = str:match('^%[soundcloud%] (.+):') + if song:match('%d+')~=song then + songName = song:match('.+/(.+)') + end end end until s:read()==nil