[Mod] Preemptive fix for the next dpy update (#3891)

This commit is contained in:
Flame442 2020-05-30 21:56:21 -04:00 committed by GitHub
parent 7a86cc4bf3
commit 6984dca394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,8 +551,7 @@ class KickBanMixin(MixinMeta):
# Store this channel for the case channel. # Store this channel for the case channel.
try: try:
await member.move_to(discord.Object(id=None)) await member.move_to(None)
# Work around till we get D.py 1.1.0, whereby we can directly do None.
except discord.Forbidden: # Very unlikely that this will ever occur except discord.Forbidden: # Very unlikely that this will ever occur
await ctx.send(_("I am unable to kick this member from the voice channel.")) await ctx.send(_("I am unable to kick this member from the voice channel."))
return return