diff options
author | AnInternetTroll <lucafulger@gmail.com> | 2020-07-27 20:45:42 +0000 |
---|---|---|
committer | AnInternetTroll <lucafulger@gmail.com> | 2020-07-27 20:45:42 +0000 |
commit | 945777abb0136b1d8f9be858365efe55287e6f6c (patch) | |
tree | ad37da3c22319feb19b9049efc87fbc483f68dec /cogs/utils.py | |
parent | 27c6a4a11ecfecfc5c989c96d9b236e89faf5984 (diff) | |
download | steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar.gz steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar.bz2 steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar.lz steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar.xz steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.tar.zst steve-bot-945777abb0136b1d8f9be858365efe55287e6f6c.zip |
Added base for an API
Diffstat (limited to '')
-rwxr-xr-x | cogs/utils.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cogs/utils.py b/cogs/utils.py index ab9bc42..a8de13a 100755 --- a/cogs/utils.py +++ b/cogs/utils.py @@ -225,10 +225,12 @@ class Utils(commands.Cog): async def leaderboard(self, ctx): """Leaderboard of the people that matter""" async with ctx.typing(): - lbFunc = functools.partial(save_leaderboard) - await self.bot.loop.run_in_executor(None, lbFunc) - await ctx.send(file=discord.File("leaderboard.png")) - + try: + lbFunc = functools.partial(save_leaderboard) + await self.bot.loop.run_in_executor(None, lbFunc) + await ctx.send(file=discord.File("leaderboard.png")) + except: + await ctx.send("https://aninternettroll.github.io/mcbeVerifierLeaderboard/") @leaderboard.error async def leaderboard_handler(self,ctx,error): |