Update jpl code

This commit is contained in:
Stijn De Clercq 2021-08-19 20:35:22 +02:00
parent cbe1cf747f
commit daae31a298
3 changed files with 24 additions and 3 deletions

View file

@ -2,7 +2,7 @@ from decorators import help
from discord.ext import commands
from enums.help_categories import Category
from functions import checks, config
from functions.football import getMatches, getTable
from functions.football import getMatches, getTable, get_jpl_code
class Football(commands.Cog):
@ -36,6 +36,13 @@ class Football(commands.Cog):
async def table(self, ctx, *args):
await ctx.send(getTable())
@commands.check(checks.isMe)
@jpl.command(name="Update")
async def update(self, ctx):
code = get_jpl_code()
config.config("jpl", code)
await ctx.message.add_reaction("")
def setup(client):
client.add_cog(Football(client))