doc
This commit is contained in:
parent
a7a1a3242e
commit
3bc24d45af
1 changed files with 2 additions and 2 deletions
|
@ -59,8 +59,8 @@ class PostModal(ui.Modal, title="Post verfassen"):
|
||||||
async def on_submit(self, interaction: discord.Interaction):
|
async def on_submit(self, interaction: discord.Interaction):
|
||||||
post_content = f"{self.content.value}\n> Gepostet von <@{interaction.user.id}>"
|
post_content = f"{self.content.value}\n> Gepostet von <@{interaction.user.id}>"
|
||||||
|
|
||||||
|
# Vorschau mit Buttons
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
# Vorschau mit Buttons
|
|
||||||
content=f"## Post-Vorschau\n\n{post_content}",
|
content=f"## Post-Vorschau\n\n{post_content}",
|
||||||
view=(view := PostConfirm()),
|
view=(view := PostConfirm()),
|
||||||
# nur für ausführenden User
|
# nur für ausführenden User
|
||||||
|
@ -103,11 +103,11 @@ async def post(interaction: discord.Interaction):
|
||||||
await interaction.response.send_modal(PostModal())
|
await interaction.response.send_modal(PostModal())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
# Zugriff verweigern
|
||||||
_logger.warning(
|
_logger.warning(
|
||||||
f"User {interaction.user.name}({interaction.user.id}) tried to /post"
|
f"User {interaction.user.name}({interaction.user.id}) tried to /post"
|
||||||
)
|
)
|
||||||
await interaction.response.send_message(
|
await interaction.response.send_message(
|
||||||
# Zugriff verweigern
|
|
||||||
content="Du bist nicht berechtigt, den `/post`-Befehl zu benutzen!",
|
content="Du bist nicht berechtigt, den `/post`-Befehl zu benutzen!",
|
||||||
# nur für ausführenden User
|
# nur für ausführenden User
|
||||||
ephemeral=True,
|
ephemeral=True,
|
||||||
|
|
Loading…
Reference in a new issue