aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcogs/admin.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/cogs/admin.py b/cogs/admin.py
index a966334..4df1909 100755
--- a/cogs/admin.py
+++ b/cogs/admin.py
@@ -1,6 +1,7 @@
import asyncio
import json
import os
+import subprocess
import discord
import git
@@ -180,7 +181,7 @@ class Admin(commands.Cog):
await ctx.send("You need to name someone to unmute")
return
elif type(members) == str:
- members = self.bot.get_user(int(user))
+ members = self.bot.get_user(int(members))
muted_role = ctx.guild.get_role(
int(self.bot.config[str(ctx.message.guild.id)]["mute_role"])
@@ -247,7 +248,7 @@ class Admin(commands.Cog):
await ctx.send("You need to name someone to blacklist")
return
elif type(members) == "str":
- members = self.bot.get_user(int(user))
+ members = self.bot.get_user(int(members))
with open("blacklist.json", "w") as f:
for i in members:
@@ -341,6 +342,16 @@ class Admin(commands.Cog):
the_role = ctx.guild.get_role(int(role_id))
await ctx.author.add_roles(the_role)
+ @commands.command(aliases=["calc"])
+ async def drun(self, ctx, *, uri: str):
+ """Check to see if a runs video is potentially stolen"""
+ try:
+ result = subprocess.check_output(f"echo {uri} | drun", shell=True)
+ await ctx.send(result.decode("utf-8").strip())
+ except subprocess.CalledProcessError as err:
+ print(err)
+ await ctx.send("Something went wrong")
+
def setup(bot):
bot.add_cog(Admin(bot))
class='insertions'>+4 2021-01-03ReformattedMango0x451-2/+4 2021-01-03This code isnt working atmMango0x451-53/+53 2021-01-03Add math command with BCMango0x451-0/+10 2021-01-02Happy Birthday Samuel!aninternettroll1-0/+5 2020-12-14Some tuple and typehint stuffsMango0x451-9/+9 2020-12-14Store user data in named tuplesMango0x451-104/+123 2020-12-14Formatted with blackMango0x452-1/+2 2020-12-14Sort importsMango0x452-2/+4 2020-12-08Fixed misunderstanding of type hintingLuca Matei Pintilie1-1/+1 2020-11-20changed my name to SkyeSkycloudd1-1/+1 2020-11-20Update utils.pyLuca Matei Pintilie1-1/+1 2020-11-09I heard the public domain is a cool place to beMango0x452-661/+24 2020-11-01Discord.py voice dependency addedAnInternetTroll3-114/+179 2020-10-21fixed boosts field in serverinfoSkycloudd1-3/+3 2020-10-21fixed boosts field in serverinfoSkycloudd1-2/+2 2020-10-21fixed serverinfo inactive member count descriptionSkycloudd1-1/+1