#293_complaints #326

Merged
edraft merged 4 commits from #293_complaints into 1.1.0 2023-08-14 09:37:08 +02:00
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 0f67bf467a - Show all commits

View File

@ -154,7 +154,8 @@
"complaints": {
"title": "Beschwerde einreichen",
"label": "Beschwerde",
"message": "{} hat eine Beschwerde eingereicht:\n{}"
"message": "{} hat eine Beschwerde eingereicht:\n{}",
"response": "Danke für deine Beschwerde"
},
"afk_command_channel_missing_message": "Zu unfähig einem Sprachkanal beizutreten?",
"afk_command_move_message": "Ich verschiebe dich ja schon... (◔_◔)",

View File

@ -1,7 +1,7 @@
import discord
from cpl_core.database.context import DatabaseContextABC
from cpl_translation import TranslatePipe
from discord import ui
from discord import ui, TextStyle
from bot_core.abc.message_service_abc import MessageServiceABC
from bot_core.logging.command_logger import CommandLogger
@ -10,7 +10,7 @@ from modules.base.service.base_helper_service import BaseHelperService
class ComplaintForm(ui.Modal):
description = ui.TextInput(label="Complain about something", required=True)
description = ui.TextInput(label="Complain about something", required=True, style=TextStyle.long)
def __init__(
self,
@ -32,7 +32,7 @@ class ComplaintForm(ui.Modal):
async def on_submit(self, interaction: discord.Interaction):
self._logger.debug(__name__, f"Started complaint command form")
settings: BaseServerSettings = self._base_helper.get_config(interaction.message.guild.id)
settings: BaseServerSettings = self._base_helper.get_config(interaction.guild.id)
channel = interaction.guild.get_channel(settings.team_channel_id)
await self._message_service.send_channel_message(
channel,
@ -41,4 +41,7 @@ class ComplaintForm(ui.Modal):
),
is_persistent=True,
)
await self._message_service.send_interaction_msg(
interaction, self._t.transform("modules.base.complaints.response")
)
self._logger.trace(__name__, f"Finished complaint command form")