2021-09-26 22:12:52 +02:00
|
|
|
from discord.ext import commands
|
2021-11-05 23:36:12 +01:00
|
|
|
from dislash import SlashInteraction, slash_command, Option, OptionType
|
2021-09-26 22:12:52 +02:00
|
|
|
|
2021-11-05 23:36:12 +01:00
|
|
|
from data.embeds.food import Menu
|
2021-09-26 22:12:52 +02:00
|
|
|
from startup.didier import Didier
|
|
|
|
|
|
|
|
|
|
|
|
class SchoolSlash(commands.Cog):
|
|
|
|
def __init__(self, client: Didier):
|
|
|
|
self.client: Didier = client
|
|
|
|
|
|
|
|
@slash_command(
|
|
|
|
name="eten",
|
2021-11-05 23:36:12 +01:00
|
|
|
description="Menu in de UGENT resto's op een bepaalde dag",
|
2021-09-26 22:12:52 +02:00
|
|
|
options=[
|
|
|
|
Option(
|
|
|
|
"dag",
|
|
|
|
description="Dag",
|
|
|
|
type=OptionType.STRING
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2021-11-05 23:36:12 +01:00
|
|
|
async def _food_slash(self, interaction: SlashInteraction, dag: str = None):
|
|
|
|
embed = Menu(dag).to_embed()
|
2021-09-26 22:12:52 +02:00
|
|
|
await interaction.reply(embed=embed)
|
|
|
|
|
|
|
|
|
|
|
|
def setup(client: Didier):
|
|
|
|
client.add_cog(SchoolSlash(client))
|