mirror of
https://code.lenaisten.de/Lenaisten/lenaverse-bot.git
synced 2024-11-21 22:43:01 +00:00
InfoCommand.name field
This commit is contained in:
parent
d3b7a445c5
commit
534c31bbe4
2 changed files with 11 additions and 10 deletions
|
@ -31,6 +31,7 @@ class Post(BaseModel):
|
|||
|
||||
|
||||
class InfoCommand(BaseModel):
|
||||
name: StrippedStr
|
||||
description: StrippedStr = "..."
|
||||
content: StrippedStr = ""
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ def reply_private(interaction: discord.Interaction, name: str) -> bool:
|
|||
|
||||
|
||||
@ev_command(
|
||||
name="info",
|
||||
name=CONFIG.ev_info.info.name,
|
||||
description=CONFIG.ev_info.info.description,
|
||||
)
|
||||
async def info(interaction: discord.Interaction) -> None:
|
||||
|
@ -24,12 +24,12 @@ async def info(interaction: discord.Interaction) -> None:
|
|||
|
||||
await interaction.response.send_message(
|
||||
content=CONFIG.ev_info.info.content,
|
||||
ephemeral=reply_private(interaction, "info"),
|
||||
ephemeral=reply_private(interaction, CONFIG.ev_info.info.name),
|
||||
)
|
||||
|
||||
|
||||
@ev_command(
|
||||
name="linktree",
|
||||
name=CONFIG.ev_info.linktree.name,
|
||||
description=CONFIG.ev_info.linktree.description,
|
||||
)
|
||||
async def linktree(interaction: discord.Interaction) -> None:
|
||||
|
@ -40,12 +40,12 @@ async def linktree(interaction: discord.Interaction) -> None:
|
|||
await interaction.response.send_message(
|
||||
content=CONFIG.ev_info.linktree.content,
|
||||
suppress_embeds=True,
|
||||
ephemeral=reply_private(interaction, "linktree"),
|
||||
ephemeral=reply_private(interaction, CONFIG.ev_info.linktree.name),
|
||||
)
|
||||
|
||||
|
||||
@ev_command(
|
||||
name="join",
|
||||
name=CONFIG.ev_info.join.name,
|
||||
description=CONFIG.ev_info.join.description,
|
||||
)
|
||||
async def join(interaction: discord.Interaction) -> None:
|
||||
|
@ -57,7 +57,7 @@ async def join(interaction: discord.Interaction) -> None:
|
|||
await interaction.response.send_message(
|
||||
content=CONFIG.ev_info.join.content,
|
||||
file=file,
|
||||
ephemeral=reply_private(interaction, "join"),
|
||||
ephemeral=reply_private(interaction, CONFIG.ev_info.join.name),
|
||||
)
|
||||
|
||||
else:
|
||||
|
@ -68,7 +68,7 @@ async def join(interaction: discord.Interaction) -> None:
|
|||
|
||||
|
||||
@ev_command(
|
||||
name="fest",
|
||||
name=CONFIG.ev_info.fest.name,
|
||||
description=CONFIG.ev_info.fest.description,
|
||||
)
|
||||
async def fest(interaction: discord.Interaction) -> None:
|
||||
|
@ -78,12 +78,12 @@ async def fest(interaction: discord.Interaction) -> None:
|
|||
|
||||
await interaction.response.send_message(
|
||||
content=CONFIG.ev_info.fest.content,
|
||||
ephemeral=reply_private(interaction, "fest"),
|
||||
ephemeral=reply_private(interaction, CONFIG.ev_info.fest.name),
|
||||
)
|
||||
|
||||
|
||||
@ev_command(
|
||||
name="aktion",
|
||||
name=CONFIG.ev_info.aktion.name,
|
||||
description=CONFIG.ev_info.aktion.description,
|
||||
)
|
||||
async def aktion(interaction: discord.Interaction) -> None:
|
||||
|
@ -93,7 +93,7 @@ async def aktion(interaction: discord.Interaction) -> None:
|
|||
|
||||
await interaction.response.send_message(
|
||||
content=CONFIG.ev_info.aktion.content,
|
||||
ephemeral=reply_private(interaction, "aktion"),
|
||||
ephemeral=reply_private(interaction, CONFIG.ev_info.aktion.name),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue