InfoCommand.name field
This commit is contained in:
parent
d3b7a445c5
commit
e9de83daed
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.description),
|
||||
)
|
||||
|
||||
|
||||
@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.description),
|
||||
)
|
||||
|
||||
|
||||
@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.description),
|
||||
)
|
||||
|
||||
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.description),
|
||||
)
|
||||
|
||||
|
||||
@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.description),
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue