diff options
-rwxr-xr-x | cogs/admin.py | 9 | ||||
-rwxr-xr-x | cogs/api_keys.json | 1 | ||||
-rwxr-xr-x | cogs/utils.py | 11 | ||||
-rw-r--r-- | leaderboard.png | bin | 0 -> 18981 bytes |
4 files changed, 17 insertions, 4 deletions
diff --git a/cogs/admin.py b/cogs/admin.py index 1e3777b..d8de2ad 100755 --- a/cogs/admin.py +++ b/cogs/admin.py @@ -15,10 +15,17 @@ class Admin(commands.Cog): @commands.command(aliases=['deleteEverything'], hidden=True) @commands.check(is_mod) async def purge(self, ctx, password): - if password == "MangoSucksAss": + if password == "MaxCantBeTrusted": async for msg in ctx.channel.history(): await msg.delete() + @commands.command(aliases=['quit'], hidden=True) + @commands.check(is_mod) + async def forceexit(self, ctx, password): + if password == "abort": + ctx.message.delete() + exit() + @commands.command() @commands.check(is_mod) async def pull(self, ctx): diff --git a/cogs/api_keys.json b/cogs/api_keys.json deleted file mode 100755 index 9e26dfe..0000000 --- a/cogs/api_keys.json +++ /dev/null @@ -1 +0,0 @@ -{}
\ No newline at end of file diff --git a/cogs/utils.py b/cogs/utils.py index 1192ff6..2dbc6d1 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -8,6 +8,7 @@ import datetime from random import randint from datetime import timedelta from selenium import webdriver +from selenium.webdriver.chrome.options import Options @@ -127,11 +128,17 @@ class Utils(commands.Cog): @commands.command() async def leaderboard(self, ctx): DRIVER = '/usr/lib/chromium-browser/chromedriver' - driver = webdriver.Chrome(DRIVER) + chrome_options = Options() + chrome_options.add_argument("--disable-dev-shm-usage") + chrome_options.add_argument("--headless") + chrome_options.add_argument("--no-sandbox") + chrome_options.add_argument("--disable-gpu") + #chrome_options.binary_location = "" + driver = webdriver.Chrome(DRIVER, chrome_options=chrome_options) driver.get('https://aninternettroll.github.io/mcbeVerifierLeaderboard/') screenshot = driver.save_screenshot('leaderboard.png') driver.quit() - await ctx.send(self, ctx, file=discord.File(leaderboard.png)) + await ctx.send(file=discord.File("leaderboard.png")) def setup(bot): bot.add_cog(Utils(bot)) diff --git a/leaderboard.png b/leaderboard.png Binary files differnew file mode 100644 index 0000000..81aa984 --- /dev/null +++ b/leaderboard.png |