diff options
author | AnInternetTroll <lucafulger@gmail.com> | 2020-05-29 12:21:17 +0000 |
---|---|---|
committer | AnInternetTroll <lucafulger@gmail.com> | 2020-05-29 12:21:17 +0000 |
commit | 2ac6f45e41ff6e01766d20c4ead57652f1fe28d3 (patch) | |
tree | c4e7504fbd4856929a24ccb355623c3edf237118 | |
parent | 8a8591387437871cd4a01ec0a04505c9f9dc7dd5 (diff) | |
download | steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar.gz steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar.bz2 steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar.lz steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar.xz steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.tar.zst steve-bot-2ac6f45e41ff6e01766d20c4ead57652f1fe28d3.zip |
Various fixes
-rwxr-xr-x | .gitignore | 1 | ||||
-rwxr-xr-x | bot.py | 2 | ||||
-rwxr-xr-x | cogs/src.py | 2 | ||||
-rwxr-xr-x | cogs/utils.py | 18 | ||||
-rwxr-xr-x | custom_commands.json | 2 |
5 files changed, 20 insertions, 5 deletions
@@ -1,4 +1,5 @@ __pycache__ config.py discord.log +api_keys.json .vscode/ @@ -28,7 +28,7 @@ def get_prefix(bot, message): class BedrockBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=get_prefix) + super().__init__(command_prefix=get_prefix, case_insensitive=True) self.logger = logging.getLogger('discord') with open('custom_commands.json', 'r') as f: 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)) diff --git a/custom_commands.json b/custom_commands.json index 8beee55..6558699 100755 --- a/custom_commands.json +++ b/custom_commands.json @@ -1 +1 @@ -{"/src": "https://www.speedrun.com/mcbe", "/launcher": "https://github.com/MCMrARM/mc-w10-version-launcher/releases/tag/0.1.0", "/locate": "head north", "/boards": "https://www.speedrun.com/mcbe", "/leaderboards": "https://www.speedrun.com/mcbe", "/ban": "shut up", "/ssg": "https://www.speedrun.com/mcbe#Any_Glitchless", "/hoes": "stop asking for this shit", "/Make": "Troll Supermod", "/Don't": "Buy The Sun Newspaper", "/Troll": "is Super at his job", "/troll": "The greatest mod this game has", "/welcome": "Welcome! <:Cake:619552132298964993>", "/pending": "this annoys me", "!murray": "the irishest of the Irish", "!HereWeGo": "10 in a Row!", "!GlasgowRangers": "You Let Your Club Die!", "!hwg": "10 iar", "!When-you-walk-through-a-storm": "hold your head up high", "!At-the-end-of-a-Storm": "there's a golden sky and the sweet silver song of the lark", "!Walk-On": "Walk On with hope in your hearts and You'll Never Walk Alone", "!Walk-On-through-the-Wind": "Walk On through the rain", "!For-your-dreams": "be tossed and blown", "!When-you-walk": "through a storm hold your head up high and don't be afraid of the dark\nAt the end of a Storm there's a golden sky and the sweet silver song of the lark\nWalk on through the wind\nWalk on through the rain, for your dreams be tossed and blown\nWalk On, Walk On with hope in your hearts and You'll Never Walk Alone, **YOU'LL NEVER WALK ALONE**\nWalk On, Walk On with hope in your hearts and You'll Never Walk Alone, **YOU'LL NEVER WALK ALONE**", "!Scotland'sNo1": "Celtic", "/swipe": "not an alt", "!blacklist": "Done! That felt good", "/blacklist": "Done! That felt good"}
\ No newline at end of file +{"/src": "https://www.speedrun.com/mcbe", "/launcher": "https://github.com/MCMrARM/mc-w10-version-launcher/releases/tag/0.1.0", "/locate": "head north", "/boards": "https://www.speedrun.com/mcbe", "/leaderboards": "https://www.speedrun.com/mcbe", "/ban": "shut up", "/ssg": "https://www.speedrun.com/mcbe#Any_Glitchless", "/hoes": "stop asking for this shit", "/Make": "Troll Supermod", "/Don't": "Buy The Sun Newspaper", "/Troll": "is Super at his job", "/troll": "The greatest mod this game has", "/welcome": "Welcome! <:Cake:619552132298964993>", "/pending": "this annoys me", "!murray": "the irishest of the Irish", "!HereWeGo": "10 in a Row!", "!GlasgowRangers": "You Let Your Club Die!", "!hwg": "10 iar", "!When-you-walk-through-a-storm": "hold your head up high", "!At-the-end-of-a-Storm": "there's a golden sky and the sweet silver song of the lark", "!Walk-On": "Walk On with hope in your hearts and You'll Never Walk Alone", "!Walk-On-through-the-Wind": "Walk On through the rain", "!For-your-dreams": "be tossed and blown", "!When-you-walk": "through a storm hold your head up high and don't be afraid of the dark\nAt the end of a Storm there's a golden sky and the sweet silver song of the lark\nWalk on through the wind\nWalk on through the rain, for your dreams be tossed and blown\nWalk On, Walk On with hope in your hearts and You'll Never Walk Alone, **YOU'LL NEVER WALK ALONE**\nWalk On, Walk On with hope in your hearts and You'll Never Walk Alone, **YOU'LL NEVER WALK ALONE**", "!Scotland'sNo1": "Celtic", "/swipe": "not an alt", "!blacklist": "Done! That felt good", "/blacklist": "Done! That felt good", "!sr.c": "https://www.speedrun.com/mcbe", "!h": "<@!199070670221475842> no swearing in this christian discord server"}
\ No newline at end of file |