Added a silent exception for playing music and not having permissions to send messages, as this seems to happen commonly based on error logs
This commit is contained in:
parent
ceddb2b7c8
commit
ef1608b482
1 changed files with 5 additions and 2 deletions
|
@ -289,13 +289,16 @@ class Music:
|
||||||
return
|
return
|
||||||
except IndexError:
|
except IndexError:
|
||||||
fmt = "Sorry, but there's no result with that search time! Try something else"
|
fmt = "Sorry, but there's no result with that search time! Try something else"
|
||||||
await self.bot.say(fmt)
|
await self.bot.send_message(ctx.message.channel, fmt)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Now we can create a VoiceEntry and queue it
|
# Now we can create a VoiceEntry and queue it
|
||||||
entry = VoiceEntry(ctx.message, player)
|
entry = VoiceEntry(ctx.message, player)
|
||||||
await state.songs.put(entry)
|
await state.songs.put(entry)
|
||||||
|
try:
|
||||||
await self.bot.say('Enqueued ' + str(entry))
|
await self.bot.say('Enqueued ' + str(entry))
|
||||||
|
except discord.Forbidden:
|
||||||
|
pass
|
||||||
|
|
||||||
@commands.command(pass_context=True, no_pm=True)
|
@commands.command(pass_context=True, no_pm=True)
|
||||||
@checks.custom_perms(kick_members=True)
|
@checks.custom_perms(kick_members=True)
|
||||||
|
|
Loading…
Reference in a new issue