diff options
-rwxr-xr-x | cogs/src.py | 7 | ||||
-rwxr-xr-x | custom_commands.json | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cogs/src.py b/cogs/src.py index 44a26bd..de85366 100755 --- a/cogs/src.py +++ b/cogs/src.py @@ -6,6 +6,7 @@ import requests import json import asyncio from datetime import timedelta +import dateutil.parser async def rejectRun(self, apiKey, ctx, run, reason): await ctx.message.delete() @@ -49,7 +50,6 @@ async def deleteRun(self, apiKey, ctx, run): await ctx.send("Something went wrong") await ctx.message.author.send(f"```json\n{json.dumps(json.loads(r.text),indent=4)}```") - async def verifyRole(self, ctx, apiKey): server = self.bot.get_guild(574267523869179904) RunneRole = server.get_role(574268937454223361) @@ -86,7 +86,6 @@ async def clear(self): async for msg in self.bot.get_channel(699713639866957905).history(): await msg.delete() - async def pendingRuns(self, ctx): mcbe_runs = 0 mcbeil_runs = 0 @@ -129,6 +128,8 @@ async def pendingRuns(self, ctx): player = value["data"][0]["names"]["international"] if key == 'times': rta = timedelta(seconds=value['realtime_t']) + if key == 'submitted': + timestamp = dateutil.parser.isoparse(value) except Exception as e: print(e.args) break @@ -139,7 +140,7 @@ async def pendingRuns(self, ctx): leaderboard = "Category Extension Run" mcbece_runs += 1 embed = discord.Embed( - title=leaderboard, url=link, description=f"{categoryName} in `{str(rta).replace('000','')}` by **{player}**", color=16711680+i*60) + title=leaderboard, url=link, description=f"{categoryName} in `{str(rta).replace('000','')}` by **{player}**", color=16711680+i*60, timestamp=timestamp) await self.bot.get_channel(699713639866957905).send(embed=embed) runs = runs2 gameID = gameID2 diff --git a/custom_commands.json b/custom_commands.json index d0e3a51..a393fb0 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"}
\ 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"}
\ No newline at end of file |