aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xcogs/src.py2
-rwxr-xr-xcogs/utils.py18
2 files changed, 17 insertions, 3 deletions
diff --git a/cogs/src.py b/cogs/src.py
index 30ae169..422e20c 100755
--- a/cogs/src.py
+++ b/cogs/src.py
@@ -6,7 +6,7 @@ import discord
import requests
import json
import asyncio
-
+import dateutil.parser
async def rejectRun(self, apiKey, ctx, run, reason):
await ctx.message.delete()
diff --git a/cogs/utils.py b/cogs/utils.py
index aeaee5f..1192ff6 100755
--- a/cogs/utils.py
+++ b/cogs/utils.py
@@ -5,7 +5,10 @@ import requests
import json
import asyncio
import datetime
+from random import randint
from datetime import timedelta
+from selenium import webdriver
+
async def reportStuff(self, ctx, message):
@@ -36,7 +39,7 @@ class Utils(commands.Cog):
return
totalEyes = 0
for i in range(12):
- randomness = random.randint(1,10)
+ randomness = randint(1,10)
if randomness == 1:
totalEyes += randomness
else:
@@ -45,7 +48,7 @@ class Utils(commands.Cog):
# haha sneaky sneaky
Thomas = self.bot.get_user(280428276810383370)
if ctx.message.author == Thomas:
- totalEyes == 12
+ totalEyes = 12
await ctx.send(f"{ctx.message.author.display_name} -> your seed is a {totalEyes} eye")
@@ -55,6 +58,8 @@ class Utils(commands.Cog):
if ctx.message.channel.id != 684787316489060422:
ctx.message.delete()
return
+ else:
+ await ctx.send(error)
#await ctx.send(f"{ctx.message.author.display_name}, you have to wait {round(error.retry_after, 7)} seconds before using this again.")
@commands.Cog.listener()
@@ -119,5 +124,14 @@ class Utils(commands.Cog):
else:
await reportStuff(self, ctx, message)
+ @commands.command()
+ async def leaderboard(self, ctx):
+ DRIVER = '/usr/lib/chromium-browser/chromedriver'
+ driver = webdriver.Chrome(DRIVER)
+ 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))
+
def setup(bot):
bot.add_cog(Utils(bot))