mirror of https://github.com/stijndcl/didier
Inspire slash command, defer jpl table
parent
9eb0eb5a61
commit
eaed08168c
|
@ -9,3 +9,4 @@ files/ufora_notifications.json
|
|||
__pycache__
|
||||
.env
|
||||
/venv/
|
||||
.pytest_cache
|
|
@ -151,7 +151,7 @@ class Oneliners(commands.Cog):
|
|||
@commands.command(name="Inspire")
|
||||
@help.Category(Category.Other)
|
||||
async def inspire(self, ctx):
|
||||
image = get("http://inspirobot.me/api?generate=true")
|
||||
image = get("https://inspirobot.me/api?generate=true")
|
||||
|
||||
if image.status_code == 200:
|
||||
await ctx.send(image.text)
|
||||
|
|
|
@ -23,6 +23,7 @@ class FootballSlash(commands.Cog):
|
|||
|
||||
@_jpl_group.command(name="table", description="Huidige rangschikking")
|
||||
async def _jpl_table_slash(self, ctx: ApplicationContext):
|
||||
await ctx.response.defer()
|
||||
await ctx.respond(get_table())
|
||||
|
||||
@_jpl_group.command(name="update", description="Update de code voor deze competitie (owner-only)", default_permission=False)
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
from discord.ext import commands
|
||||
from discord.commands import slash_command, ApplicationContext
|
||||
from requests import get
|
||||
|
||||
from startup.didier import Didier
|
||||
|
||||
|
||||
class OtherSlash(commands.Cog):
|
||||
def __init__(self, client: Didier):
|
||||
self.client: Didier = client
|
||||
|
||||
@slash_command(name="inspire", description="Genereer quotes via Inspirobot.")
|
||||
async def _inspire_slash(self, ctx: ApplicationContext):
|
||||
image = get("https://inspirobot.me/api?generate=true")
|
||||
|
||||
if image.status_code == 200:
|
||||
await ctx.respond(image.text)
|
||||
else:
|
||||
await ctx.respond("Uh oh API down.")
|
||||
|
||||
|
||||
def setup(client: Didier):
|
||||
client.add_cog(OtherSlash(client))
|
|
@ -52,7 +52,7 @@
|
|||
"hangman start": "Start een nieuwe Hangman game indien er nog geen bezig is. Indien je geen woord opgeeft, wordt er een willekeurig woord gekozen.\n**Indien je wel een woord opgeeft, werkt dit enkel in DM.**",
|
||||
"hangman guess": "Probeer het woord te raden.",
|
||||
"claim": "Claim [Aantal] Didier Dinks uit je profit.\nIndien je geen aantal opgeeft (of \"all\"), claim je alles, inclusief je investering.",
|
||||
"inspire": "Generate quotes via [InspiroBot](https://inspirobot.me/).",
|
||||
"inspire": "Genereer quotes via [InspiroBot](https://inspirobot.me/).",
|
||||
"inventory": "Bekijk de items in jouw inventory.",
|
||||
"invest": "Investeer [Aantal] Didier Dinks in jouw Didier Bank om rente te vergaren.",
|
||||
"jpl": "Informatie over de Jupiler Pro League.",
|
||||
|
|
Loading…
Reference in New Issue