Skip to content

Commit

Permalink
[adminutils] massmove(kick) if no to_channel provided (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: Fixator10 <fixator10@gmail.com>
  • Loading branch information
kablekompany and fixator10 authored Nov 7, 2020
1 parent c549073 commit 1a28ef0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adminutils/adminutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def restartvoice(self, ctx):
@checks.admin_or_permissions(move_members=True)
@commands.bot_has_guild_permissions(move_members=True)
async def massmove(
self, ctx, from_channel: discord.VoiceChannel, to_channel: discord.VoiceChannel
self, ctx, from_channel: discord.VoiceChannel, to_channel: discord.VoiceChannel = None
):
"""Move all members from one voice channel to another
Expand All @@ -132,7 +132,7 @@ async def massmove(
if not from_channel.permissions_for(ctx.me).move_members:
await ctx.send(chat.error(_("I cant move users from that channel")))
return
if not to_channel.permissions_for(ctx.me).connect:
if to_channel and not to_channel.permissions_for(ctx.me).connect:
await ctx.send(chat.error(_("I cant move users to that channel")))
return
async with ctx.typing():
Expand Down

0 comments on commit 1a28ef0

Please sign in to comment.