massban fixes
This commit is contained in:
parent
1ebb049f09
commit
cff5a3f80d
1 changed files with 3 additions and 3 deletions
|
@ -292,8 +292,8 @@ class Mod(Cog):
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def massban(self, ctx, targets: str):
|
async def massban(self, ctx, targets: str):
|
||||||
"""Bans users with their IDs, doesn't message them, staff only."""
|
"""Bans users with their IDs, doesn't message them, staff only."""
|
||||||
for target_str in targets.split(" "):
|
targets_int = [int(target) for target in targets.strip().split(" ")]
|
||||||
target = int(target_str)
|
for target in targets_int:
|
||||||
target_user = await self.bot.fetch_user(target)
|
target_user = await self.bot.fetch_user(target)
|
||||||
target_member = ctx.guild.get_member(target)
|
target_member = ctx.guild.get_member(target)
|
||||||
# Hedge-proofing the code
|
# Hedge-proofing the code
|
||||||
|
@ -326,7 +326,7 @@ class Mod(Cog):
|
||||||
|
|
||||||
log_channel = self.bot.get_channel(config.modlog_channel)
|
log_channel = self.bot.get_channel(config.modlog_channel)
|
||||||
await log_channel.send(chan_message)
|
await log_channel.send(chan_message)
|
||||||
await ctx.send(f"All {len(targets)} users are now b&. 👍")
|
await ctx.send(f"All {len(targets_int)} users are now b&. 👍")
|
||||||
|
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@commands.bot_has_permissions(ban_members=True)
|
@commands.bot_has_permissions(ban_members=True)
|
||||||
|
|
Loading…
Reference in a new issue