diff options
Diffstat (limited to '')
-rwxr-xr-x | cogs/src.py | 13 | ||||
-rwxr-xr-x | cogs/utils.py | 5 | ||||
-rwxr-xr-x | custom_commands.json | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/cogs/src.py b/cogs/src.py index 35815cf..6274338 100755 --- a/cogs/src.py +++ b/cogs/src.py @@ -69,9 +69,10 @@ async def verifyRole(self, ctx, apiKey): for i in pbs["data"]: if i["place"] == 1: if i["run"]["game"] == "yd4ovvg1" or i["run"]["game"] == "v1po7r76": - await ctx.send("WR boi") - await server.get_member(ctx.message.author.id).add_roles(WrRole) - print("WR boi") + if not i["run"]["level"]: + await ctx.send("WR boi") + await server.get_member(ctx.message.author.id).add_roles(WrRole) + print("WR boi") if i["run"]["game"] == "yd4ovvg1" or i["run"]["game"] == "v1po7r76": #print(i) await ctx.send("Runner") @@ -94,10 +95,10 @@ async def pendingRuns(self, ctx): gameID = 'yd4ovvg1' # ID of Minecraft bedrock gameID2 = 'v1po7r76' # ID of Category extension runsRequest = requests.get( - f'https://www.speedrun.com/api/v1/runs?game={gameID}&status=new&max=200&embed=category,players,level', headers=head) + f'https://www.speedrun.com/api/v1/runs?game={gameID}&status=new&max=200&embed=category,players,level&orderby=submitted', headers=head) runs = json.loads(runsRequest.text) runsRequest2 = requests.get( - f'https://www.speedrun.com/api/v1/runs?game={gameID2}&status=new&max=200&embed=category,players,level', headers=head) + f'https://www.speedrun.com/api/v1/runs?game={gameID2}&status=new&max=200&embed=category,players,level&orderby=submitted', headers=head) runs2 = json.loads(runsRequest2.text) # Use https://www.speedrun.com/api/v1/games?abbreviation=mcbe for ID @@ -178,4 +179,4 @@ class Src(commands.Cog): await deleteRun(self, apiKey, ctx, run) def setup(bot): - bot.add_cog(Src(bot))
\ No newline at end of file + bot.add_cog(Src(bot)) diff --git a/cogs/utils.py b/cogs/utils.py index 19d16b0..143b70a 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -48,6 +48,9 @@ class Utils(commands.Cog): @commands.cooldown(1, 25, commands.BucketType.guild) @commands.command() async def findseed(self, ctx): + if ctx.message.channel.id != 684787316489060422: + ctx.message.delete() + return totalEyes = 0 for i in range(12): randomness = random.randint(1,10) @@ -60,6 +63,8 @@ class Utils(commands.Cog): @findseed.error async def findseed_handler(self,ctx,error): if isinstance(error, commands.CommandOnCooldown): + if ctx.message.channel.id != 684787316489060422: + ctx.message.delete() return #await ctx.send(f"{ctx.message.author.display_name}, you have to wait {round(error.retry_after, 7)} seconds before using this again.") diff --git a/custom_commands.json b/custom_commands.json index e1499a5..d0e3a51 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>"}
\ 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"}
\ No newline at end of file |