|
|
@@ -5,6 +5,7 @@ from discord.commands import slash_command
|
|
|
import configparser
|
|
|
import os
|
|
|
from dotenv import load_dotenv
|
|
|
+from discord.ui import DesignerModal, Label, Select
|
|
|
|
|
|
|
|
|
class Matesearch(commands.Cog):
|
|
|
@@ -18,7 +19,8 @@ class Matesearch(commands.Cog):
|
|
|
self.bot = bot
|
|
|
|
|
|
#Modal form layout
|
|
|
- self.add_item(discord.ui.Select(placeholder="Select a day.", options=[
|
|
|
+ label = Label(label="Wählen Sie einen Tag")
|
|
|
+ label.add_item(discord.ui.Select(placeholder="Select a day.", options=[
|
|
|
discord.SelectOption(label="Montag", value="Montag"),
|
|
|
discord.SelectOption(label="Dienstag", value="Dienstag"),
|
|
|
discord.SelectOption(label="Mittwoch", value="Mittwoch"),
|
|
|
@@ -28,6 +30,7 @@ class Matesearch(commands.Cog):
|
|
|
discord.SelectOption(label="Sontag", value="Sontag"),
|
|
|
],min_values=1,max_values=1))
|
|
|
#self.add_item(discord.ui.InputText(label="Date", placeholder="Insert the estimated date.", required=False, ))
|
|
|
+ self.add_item(label)
|
|
|
self.add_item(discord.ui.InputText(label="Time", placeholder="Insert the estimated time."))
|
|
|
|
|
|
#funktions to load the config and get the channels
|
|
|
@@ -68,7 +71,7 @@ class Matesearch(commands.Cog):
|
|
|
|
|
|
embed = discord.Embed(title="Mitspieler gesucht!")
|
|
|
embed.add_field(name="Ersteller", value=interaction.user.mention, inline=False)
|
|
|
- embed.add_field(name="Datum", value=self.children[0].value, inline=False)
|
|
|
+ embed.add_field(name="Tag", value=self.children[0].children[0].value, inline=False)
|
|
|
embed.add_field(name="Zeit", value=self.children[1].value, inline=False)
|
|
|
self.embed = embed
|
|
|
|