aboutsummaryrefslogtreecommitdiff
path: root/cogs/admin.py
diff options
context:
space:
mode:
authorAnInternetTroll <lucafulger@gmail.com>2020-07-12 19:31:52 +0000
committerAnInternetTroll <lucafulger@gmail.com>2020-07-12 19:31:52 +0000
commit058a82a5a367d38d6c9415c6b66f034476c337c9 (patch)
treea41201970459d04f04f7711d8680708c83e633f2 /cogs/admin.py
parent36b282ef5b74370e2faab7e357e742c8167caa88 (diff)
downloadsteve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar.gz
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar.bz2
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar.lz
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar.xz
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.tar.zst
steve-bot-058a82a5a367d38d6c9415c6b66f034476c337c9.zip
Started switch from requests to aiohttp
Diffstat (limited to 'cogs/admin.py')
-rwxr-xr-xcogs/admin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cogs/admin.py b/cogs/admin.py
index 19438b4..3a6299f 100755
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -1,7 +1,6 @@
from discord.ext import commands
import discord
import asyncio
-import subprocess
import json
import git
import os
@@ -158,7 +157,7 @@ class Admin(commands.Cog):
@commands.command()
@commands.check(is_botmaster)
async def ban(self, ctx, members: commands.Greedy[discord.Member]=False,
- mute_minutes: int = 0,
+ ban_minutes: int = 0,
*, reason: str = "absolutely no reason"):
"""Mass ban members with an optional mute_minutes parameter to time it"""
@@ -172,11 +171,12 @@ class Admin(commands.Cog):
embed = discord.Embed(title = "You can't ban me, I'm an almighty bot")
await ctx.send(embed = embed)
continue
+ await member.send(f"You have been banned from {ctx.guild.name} for {mute_minutes} minutes because: ```{reason}```")
await ctx.guild.ban(member, reason=reason, delete_message_days=0)
await ctx.send("{0.mention} has been banned by {1.mention} for *{2}*".format(member, ctx.author, reason))
if mute_minutes > 0:
- await asyncio.sleep(mute_minutes * 60)
+ await asyncio.sleep(ban_minutes * 60)
for member in members:
await ctx.guild.unban(member, reason="Time is up")