diff --git a/src/theticketbot/cogs/inbox/cog_group.py b/src/theticketbot/cogs/inbox/cog_group.py index 42bbfc2..61542cd 100644 --- a/src/theticketbot/cogs/inbox/cog_group.py +++ b/src/theticketbot/cogs/inbox/cog_group.py @@ -29,6 +29,12 @@ if TYPE_CHECKING: from theticketbot.cogs.select import MessageCallback +REQUIRED_DESTINATION_PERMISSIONS = discord.Permissions( + view_channel=True, + create_private_threads=True, + send_messages_in_threads=True, +) + log = logging.getLogger(__name__) @@ -134,18 +140,13 @@ async def check_inbox_message( content = content.format(message.jump_url) raise AppCommandResponse(content) - async def check_inbox_permissions( + async def check_bot_permissions( self, interaction: discord.Interaction, channel: discord.TextChannel, + required: discord.Permissions, ) -> None: bot_permissions = channel.permissions_for(channel.guild.me) - required = discord.Permissions( - view_channel=True, - send_messages=True, - create_private_threads=True, - send_messages_in_threads=True, - ) missing = bot_permissions & required ^ required if missing: missing = ", ".join(f"`{name}`" for name, value in missing if value) @@ -182,10 +183,19 @@ async def create( destination: discord.TextChannel | None, ): assert interaction.guild is not None + destination = destination or channel # TODO: limit number of inboxes per guild - destination = destination or channel - await self.check_inbox_permissions(interaction, destination) + + channel_perms = discord.Permissions(view_channel=True, send_messages=True) + destination_perms = REQUIRED_DESTINATION_PERMISSIONS + + if channel != destination: + await self.check_bot_permissions(interaction, channel, channel_perms) + else: + destination_perms = destination_perms | channel_perms + + await self.check_bot_permissions(interaction, destination, destination_perms) content = _( # Message sent when the user is creating a new inbox in a channel, @@ -348,7 +358,11 @@ async def channel( interaction: discord.Interaction, channel: discord.TextChannel, ): - await self.check_inbox_permissions(interaction, channel) + await self.check_bot_permissions( + interaction, + channel, + REQUIRED_DESTINATION_PERMISSIONS, + ) content = _( # Message sent when a user is editing an inbox's destination, # and an inbox needs to be selected diff --git a/src/theticketbot/locales/de/LC_MESSAGES/theticketbot.po b/src/theticketbot/locales/de/LC_MESSAGES/theticketbot.po index 83d7823..b4ddd8d 100644 --- a/src/theticketbot/locales/de/LC_MESSAGES/theticketbot.po +++ b/src/theticketbot/locales/de/LC_MESSAGES/theticketbot.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-01 16:38-0400\n" +"POT-Creation-Date: 2024-07-01 22:44-0400\n" "PO-Revision-Date: 2024-06-07 17:04+0200\n" "Last-Translator: MRGalaxy <108481498+GamingGalaxy200@users.noreply.github." "com>\n" @@ -118,19 +118,19 @@ msgstr "" #. Command group name #. (alternatively translated as "panel") -#: src/theticketbot/cogs/inbox/cog_group.py:62 +#: src/theticketbot/cogs/inbox/cog_group.py:68 msgid "inbox" msgstr "panel" #. Command group description ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:64 +#: src/theticketbot/cogs/inbox/cog_group.py:70 msgid "Manage the server's ticket inboxes." msgstr "Verwalten Sie die Ticket-Panels des Servers." #. Message sent when selecting a non-inbox message #. that looks like the message used to be an inbox #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:122 +#: src/theticketbot/cogs/inbox/cog_group.py:128 #, python-brace-format msgid "Sorry, {0} is no longer recognized as an inbox and must be re-created." msgstr "" @@ -139,7 +139,7 @@ msgstr "" #. Message sent when selecting a non-inbox message #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:129 +#: src/theticketbot/cogs/inbox/cog_group.py:135 #, python-brace-format msgid "" "Sorry, {0} is not an inbox. The message you select should have a **Create " @@ -151,44 +151,44 @@ msgstr "" #. Message sent when attempting to create an inbox with insufficient permissions #. {0}: the channel's mention #. {1}: a list of permissions that are missing -#: src/theticketbot/cogs/inbox/cog_group.py:155 +#: src/theticketbot/cogs/inbox/cog_group.py:156 #, python-brace-format msgid "I need the following permissions in {0}: {1}" msgstr "Ich benötige die folgenden Berechtigungen in {0}: {1}" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:162 +#: src/theticketbot/cogs/inbox/cog_group.py:163 msgid "create" msgstr "erstelle" #. Subcommand description ("inbox create") -#: src/theticketbot/cogs/inbox/cog_group.py:164 +#: src/theticketbot/cogs/inbox/cog_group.py:165 msgid "Create a new inbox." msgstr "Erstellen Sie ein neues Panel." #. Subcommand parameter name ("inbox create") #. Subcommand parameter name ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:168 -#: src/theticketbot/cogs/inbox/cog_group.py:340 +#: src/theticketbot/cogs/inbox/cog_group.py:169 +#: src/theticketbot/cogs/inbox/cog_group.py:350 msgid "channel" msgstr "kanal" #. Subcommand parameter name ("inbox create") #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:170 -#: src/theticketbot/cogs/inbox/cog_group.py:334 +#: src/theticketbot/cogs/inbox/cog_group.py:171 +#: src/theticketbot/cogs/inbox/cog_group.py:344 msgid "destination" msgstr "" #. Subcommand parameter description ("inbox create ") -#: src/theticketbot/cogs/inbox/cog_group.py:174 +#: src/theticketbot/cogs/inbox/cog_group.py:175 msgid "The channel to post the inbox." msgstr "Der Kanal, in dem das Panel gepostet wird." #. Subcommand parameter description ("inbox create ") #. Subcommand parameter description ("inbox destination ") -#: src/theticketbot/cogs/inbox/cog_group.py:176 -#: src/theticketbot/cogs/inbox/cog_group.py:344 +#: src/theticketbot/cogs/inbox/cog_group.py:177 +#: src/theticketbot/cogs/inbox/cog_group.py:354 #, fuzzy msgid "The channel to route new tickets." msgstr "Der Kanal, in dem das Panel gepostet wird." @@ -197,7 +197,7 @@ msgstr "Der Kanal, in dem das Panel gepostet wird." #. and the inbox needs a message to be included #. {0}: the channel's mention #. {1}: the destination's mention -#: src/theticketbot/cogs/inbox/cog_group.py:195 +#: src/theticketbot/cogs/inbox/cog_group.py:205 #, fuzzy, python-brace-format msgid "" "Your inbox will be posted in {0} and tickets will be created in {1}. You " @@ -212,7 +212,7 @@ msgstr "" "auswählen*." #. The default starter message content for new tickets -#: src/theticketbot/cogs/inbox/cog_group.py:248 +#: src/theticketbot/cogs/inbox/cog_group.py:258 msgid "" "$author Thank you for creating a ticket!\n" "$staff" @@ -222,14 +222,14 @@ msgstr "" #. Message sent after a user creates an inbox #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:267 +#: src/theticketbot/cogs/inbox/cog_group.py:277 #, python-brace-format msgid "Your inbox has been created! {0}" msgstr "Ihr Panel wurde erstellt! {0}" #. Message sent when attempting to create an inbox with too large attachments #. {0}: the maximum cumulative filesize -#: src/theticketbot/cogs/inbox/cog_group.py:289 +#: src/theticketbot/cogs/inbox/cog_group.py:299 #, python-brace-format msgid "" "The message's attachments are too large! The total size must be under {0}." @@ -238,7 +238,7 @@ msgstr "" "liegen." #. Subcommand description ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:336 +#: src/theticketbot/cogs/inbox/cog_group.py:346 #, fuzzy msgid "Edit the destination channel for an inbox." msgstr "Bearbeiten Sie die Nachricht für ein Panel." @@ -251,10 +251,10 @@ msgstr "Bearbeiten Sie die Nachricht für ein Panel." #. and an inbox needs to be selected #. Message sent when a user is changing the name for new tickets, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:355 -#: src/theticketbot/cogs/inbox/cog_group.py:409 -#: src/theticketbot/cogs/inbox/cog_group.py:533 -#: src/theticketbot/cogs/inbox/cog_group.py:562 +#: src/theticketbot/cogs/inbox/cog_group.py:369 +#: src/theticketbot/cogs/inbox/cog_group.py:423 +#: src/theticketbot/cogs/inbox/cog_group.py:547 +#: src/theticketbot/cogs/inbox/cog_group.py:576 msgid "" "You must now select the inbox you want to edit. To do this, right click or " "long tap a message, then open Apps and pick the *Select this message* " @@ -268,7 +268,7 @@ msgstr "" #. Message sent when an inbox's old and new destination are the same #. {0}: the inbox's link #. {1}: the destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:379 +#: src/theticketbot/cogs/inbox/cog_group.py:393 #, python-brace-format msgid "{0} is already routing tickets to {1} !" msgstr "" @@ -277,25 +277,25 @@ msgstr "" #. {0}: the inbox's link #. {1}: the old destination's link #. {2}: the new destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:394 +#: src/theticketbot/cogs/inbox/cog_group.py:408 #, python-brace-format msgid "{0} will now route tickets to {2} instead of {1} !" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:401 +#: src/theticketbot/cogs/inbox/cog_group.py:415 msgid "message" msgstr "nachricht" #. Subcommand description ("inbox message") -#: src/theticketbot/cogs/inbox/cog_group.py:403 +#: src/theticketbot/cogs/inbox/cog_group.py:417 msgid "Edit the message for an inbox." msgstr "Bearbeiten Sie die Nachricht für ein Panel." #. Message sent when a user is editing an inbox's message, #. and a second message needs to be selected to copy its contents #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:429 +#: src/theticketbot/cogs/inbox/cog_group.py:443 #, python-brace-format msgid "{0} will be edited. Please select the message you want to copy." msgstr "" @@ -303,7 +303,7 @@ msgstr "" "möchten." #. Message sent when a user tries to edit an inbox message with itself -#: src/theticketbot/cogs/inbox/cog_group.py:447 +#: src/theticketbot/cogs/inbox/cog_group.py:461 msgid "" "The inbox message cannot be edited with itself. Please select another " "message you want to copy." @@ -313,25 +313,25 @@ msgstr "" #. Message sent after a user edits an inbox's message #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:471 +#: src/theticketbot/cogs/inbox/cog_group.py:485 #, python-brace-format msgid "{0} has been updated!" msgstr "{0} wurde aktualisiert!" # The German translation means team member which is more fitting in German as we are not employed. #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:477 +#: src/theticketbot/cogs/inbox/cog_group.py:491 msgid "staff" msgstr "teammitglieder" #. Subcommand description ("inbox staff") -#: src/theticketbot/cogs/inbox/cog_group.py:479 +#: src/theticketbot/cogs/inbox/cog_group.py:493 msgid "Manage staff for an inbox." msgstr "Verwalten Sie die Teammitglieder für ein Panel." #. Message sent when a user is managing staff for an inbox, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:485 +#: src/theticketbot/cogs/inbox/cog_group.py:499 msgid "" "You must now select the inbox you want to manage staff for. To do this, " "right click or long tap a message, then open Apps and pick the *Select this " @@ -344,38 +344,38 @@ msgstr "" #. Message sent above select menus when presenting an inbox's staff #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:505 +#: src/theticketbot/cogs/inbox/cog_group.py:519 #, python-brace-format msgid "Staff for {0} :" msgstr "Teammitglieder für {0} :" #. Subcommand group name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:518 +#: src/theticketbot/cogs/inbox/cog_group.py:532 msgid "new-tickets" msgstr "neue-tickets" #. Subcommand group description ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:520 +#: src/theticketbot/cogs/inbox/cog_group.py:534 msgid "Manage new tickets created by an inbox." msgstr "Verwalten Sie neue Tickets, die von einem Panel erstellt wurden." #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:525 +#: src/theticketbot/cogs/inbox/cog_group.py:539 msgid "starter" msgstr "startnachricht" #. Subcommand description ("inbox new-tickets starter") -#: src/theticketbot/cogs/inbox/cog_group.py:527 +#: src/theticketbot/cogs/inbox/cog_group.py:541 msgid "Set the starting message for new tickets." msgstr "Legen Sie die Startnachricht für neue Tickets fest." #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:554 +#: src/theticketbot/cogs/inbox/cog_group.py:568 msgid "name" msgstr "name" #. Subcommand description ("inbox new-tickets name") -#: src/theticketbot/cogs/inbox/cog_group.py:556 +#: src/theticketbot/cogs/inbox/cog_group.py:570 msgid "Set the name for new tickets." msgstr "Legen Sie den Namen für neue Tickets fest." diff --git a/src/theticketbot/locales/en_US/LC_MESSAGES/theticketbot.po b/src/theticketbot/locales/en_US/LC_MESSAGES/theticketbot.po index 44e2c8f..e5b0eb6 100644 --- a/src/theticketbot/locales/en_US/LC_MESSAGES/theticketbot.po +++ b/src/theticketbot/locales/en_US/LC_MESSAGES/theticketbot.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-01 16:38-0400\n" +"POT-Creation-Date: 2024-07-01 22:44-0400\n" "PO-Revision-Date: 2024-06-02 15:17-0400\n" "Last-Translator: thegamecracks <61257169+thegamecracks@users.noreply.github." "com>\n" @@ -108,26 +108,26 @@ msgstr "" #. Command group name #. (alternatively translated as "panel") -#: src/theticketbot/cogs/inbox/cog_group.py:62 +#: src/theticketbot/cogs/inbox/cog_group.py:68 msgid "inbox" msgstr "" #. Command group description ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:64 +#: src/theticketbot/cogs/inbox/cog_group.py:70 msgid "Manage the server's ticket inboxes." msgstr "" #. Message sent when selecting a non-inbox message #. that looks like the message used to be an inbox #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:122 +#: src/theticketbot/cogs/inbox/cog_group.py:128 #, python-brace-format msgid "Sorry, {0} is no longer recognized as an inbox and must be re-created." msgstr "" #. Message sent when selecting a non-inbox message #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:129 +#: src/theticketbot/cogs/inbox/cog_group.py:135 #, python-brace-format msgid "" "Sorry, {0} is not an inbox. The message you select should have a **Create " @@ -137,44 +137,44 @@ msgstr "" #. Message sent when attempting to create an inbox with insufficient permissions #. {0}: the channel's mention #. {1}: a list of permissions that are missing -#: src/theticketbot/cogs/inbox/cog_group.py:155 +#: src/theticketbot/cogs/inbox/cog_group.py:156 #, python-brace-format msgid "I need the following permissions in {0}: {1}" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:162 +#: src/theticketbot/cogs/inbox/cog_group.py:163 msgid "create" msgstr "" #. Subcommand description ("inbox create") -#: src/theticketbot/cogs/inbox/cog_group.py:164 +#: src/theticketbot/cogs/inbox/cog_group.py:165 msgid "Create a new inbox." msgstr "" #. Subcommand parameter name ("inbox create") #. Subcommand parameter name ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:168 -#: src/theticketbot/cogs/inbox/cog_group.py:340 +#: src/theticketbot/cogs/inbox/cog_group.py:169 +#: src/theticketbot/cogs/inbox/cog_group.py:350 msgid "channel" msgstr "" #. Subcommand parameter name ("inbox create") #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:170 -#: src/theticketbot/cogs/inbox/cog_group.py:334 +#: src/theticketbot/cogs/inbox/cog_group.py:171 +#: src/theticketbot/cogs/inbox/cog_group.py:344 msgid "destination" msgstr "" #. Subcommand parameter description ("inbox create ") -#: src/theticketbot/cogs/inbox/cog_group.py:174 +#: src/theticketbot/cogs/inbox/cog_group.py:175 msgid "The channel to post the inbox." msgstr "" #. Subcommand parameter description ("inbox create ") #. Subcommand parameter description ("inbox destination ") -#: src/theticketbot/cogs/inbox/cog_group.py:176 -#: src/theticketbot/cogs/inbox/cog_group.py:344 +#: src/theticketbot/cogs/inbox/cog_group.py:177 +#: src/theticketbot/cogs/inbox/cog_group.py:354 msgid "The channel to route new tickets." msgstr "" @@ -182,7 +182,7 @@ msgstr "" #. and the inbox needs a message to be included #. {0}: the channel's mention #. {1}: the destination's mention -#: src/theticketbot/cogs/inbox/cog_group.py:195 +#: src/theticketbot/cogs/inbox/cog_group.py:205 #, python-brace-format msgid "" "Your inbox will be posted in {0} and tickets will be created in {1}. You " @@ -192,7 +192,7 @@ msgid "" msgstr "" #. The default starter message content for new tickets -#: src/theticketbot/cogs/inbox/cog_group.py:248 +#: src/theticketbot/cogs/inbox/cog_group.py:258 msgid "" "$author Thank you for creating a ticket!\n" "$staff" @@ -200,21 +200,21 @@ msgstr "" #. Message sent after a user creates an inbox #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:267 +#: src/theticketbot/cogs/inbox/cog_group.py:277 #, python-brace-format msgid "Your inbox has been created! {0}" msgstr "" #. Message sent when attempting to create an inbox with too large attachments #. {0}: the maximum cumulative filesize -#: src/theticketbot/cogs/inbox/cog_group.py:289 +#: src/theticketbot/cogs/inbox/cog_group.py:299 #, python-brace-format msgid "" "The message's attachments are too large! The total size must be under {0}." msgstr "" #. Subcommand description ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:336 +#: src/theticketbot/cogs/inbox/cog_group.py:346 msgid "Edit the destination channel for an inbox." msgstr "" @@ -226,10 +226,10 @@ msgstr "" #. and an inbox needs to be selected #. Message sent when a user is changing the name for new tickets, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:355 -#: src/theticketbot/cogs/inbox/cog_group.py:409 -#: src/theticketbot/cogs/inbox/cog_group.py:533 -#: src/theticketbot/cogs/inbox/cog_group.py:562 +#: src/theticketbot/cogs/inbox/cog_group.py:369 +#: src/theticketbot/cogs/inbox/cog_group.py:423 +#: src/theticketbot/cogs/inbox/cog_group.py:547 +#: src/theticketbot/cogs/inbox/cog_group.py:576 msgid "" "You must now select the inbox you want to edit. To do this, right click or " "long tap a message, then open Apps and pick the *Select this message* " @@ -239,7 +239,7 @@ msgstr "" #. Message sent when an inbox's old and new destination are the same #. {0}: the inbox's link #. {1}: the destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:379 +#: src/theticketbot/cogs/inbox/cog_group.py:393 #, python-brace-format msgid "{0} is already routing tickets to {1} !" msgstr "" @@ -248,31 +248,31 @@ msgstr "" #. {0}: the inbox's link #. {1}: the old destination's link #. {2}: the new destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:394 +#: src/theticketbot/cogs/inbox/cog_group.py:408 #, python-brace-format msgid "{0} will now route tickets to {2} instead of {1} !" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:401 +#: src/theticketbot/cogs/inbox/cog_group.py:415 msgid "message" msgstr "" #. Subcommand description ("inbox message") -#: src/theticketbot/cogs/inbox/cog_group.py:403 +#: src/theticketbot/cogs/inbox/cog_group.py:417 msgid "Edit the message for an inbox." msgstr "" #. Message sent when a user is editing an inbox's message, #. and a second message needs to be selected to copy its contents #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:429 +#: src/theticketbot/cogs/inbox/cog_group.py:443 #, python-brace-format msgid "{0} will be edited. Please select the message you want to copy." msgstr "" #. Message sent when a user tries to edit an inbox message with itself -#: src/theticketbot/cogs/inbox/cog_group.py:447 +#: src/theticketbot/cogs/inbox/cog_group.py:461 msgid "" "The inbox message cannot be edited with itself. Please select another " "message you want to copy." @@ -280,24 +280,24 @@ msgstr "" #. Message sent after a user edits an inbox's message #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:471 +#: src/theticketbot/cogs/inbox/cog_group.py:485 #, python-brace-format msgid "{0} has been updated!" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:477 +#: src/theticketbot/cogs/inbox/cog_group.py:491 msgid "staff" msgstr "" #. Subcommand description ("inbox staff") -#: src/theticketbot/cogs/inbox/cog_group.py:479 +#: src/theticketbot/cogs/inbox/cog_group.py:493 msgid "Manage staff for an inbox." msgstr "" #. Message sent when a user is managing staff for an inbox, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:485 +#: src/theticketbot/cogs/inbox/cog_group.py:499 msgid "" "You must now select the inbox you want to manage staff for. To do this, " "right click or long tap a message, then open Apps and pick the *Select this " @@ -306,38 +306,38 @@ msgstr "" #. Message sent above select menus when presenting an inbox's staff #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:505 +#: src/theticketbot/cogs/inbox/cog_group.py:519 #, python-brace-format msgid "Staff for {0} :" msgstr "" #. Subcommand group name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:518 +#: src/theticketbot/cogs/inbox/cog_group.py:532 msgid "new-tickets" msgstr "" #. Subcommand group description ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:520 +#: src/theticketbot/cogs/inbox/cog_group.py:534 msgid "Manage new tickets created by an inbox." msgstr "" #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:525 +#: src/theticketbot/cogs/inbox/cog_group.py:539 msgid "starter" msgstr "" #. Subcommand description ("inbox new-tickets starter") -#: src/theticketbot/cogs/inbox/cog_group.py:527 +#: src/theticketbot/cogs/inbox/cog_group.py:541 msgid "Set the starting message for new tickets." msgstr "" #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:554 +#: src/theticketbot/cogs/inbox/cog_group.py:568 msgid "name" msgstr "" #. Subcommand description ("inbox new-tickets name") -#: src/theticketbot/cogs/inbox/cog_group.py:556 +#: src/theticketbot/cogs/inbox/cog_group.py:570 msgid "Set the name for new tickets." msgstr "" diff --git a/src/theticketbot/locales/fr/LC_MESSAGES/theticketbot.po b/src/theticketbot/locales/fr/LC_MESSAGES/theticketbot.po index 80e6383..e1115f3 100644 --- a/src/theticketbot/locales/fr/LC_MESSAGES/theticketbot.po +++ b/src/theticketbot/locales/fr/LC_MESSAGES/theticketbot.po @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-01 16:38-0400\n" +"POT-Creation-Date: 2024-07-01 22:44-0400\n" "PO-Revision-Date: 2024-06-18 20:40-0400\n" "Last-Translator: Raphaël Forment \n" "Language-Team: French\n" @@ -117,26 +117,26 @@ msgstr "" #. Command group name #. (alternatively translated as "panel") -#: src/theticketbot/cogs/inbox/cog_group.py:62 +#: src/theticketbot/cogs/inbox/cog_group.py:68 msgid "inbox" msgstr "panel" #. Command group description ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:64 +#: src/theticketbot/cogs/inbox/cog_group.py:70 msgid "Manage the server's ticket inboxes." msgstr "Gérer les panels de tickets du serveur." #. Message sent when selecting a non-inbox message #. that looks like the message used to be an inbox #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:122 +#: src/theticketbot/cogs/inbox/cog_group.py:128 #, python-brace-format msgid "Sorry, {0} is no longer recognized as an inbox and must be re-created." msgstr "Désolé, {0} n'est plus reconnu comme un panel et doit être recréé." #. Message sent when selecting a non-inbox message #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:129 +#: src/theticketbot/cogs/inbox/cog_group.py:135 #, python-brace-format msgid "" "Sorry, {0} is not an inbox. The message you select should have a **Create " @@ -148,44 +148,44 @@ msgstr "" #. Message sent when attempting to create an inbox with insufficient permissions #. {0}: the channel's mention #. {1}: a list of permissions that are missing -#: src/theticketbot/cogs/inbox/cog_group.py:155 +#: src/theticketbot/cogs/inbox/cog_group.py:156 #, python-brace-format msgid "I need the following permissions in {0}: {1}" msgstr "Vous avez besoin des permissions suivantes dans {0}: {1}" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:162 +#: src/theticketbot/cogs/inbox/cog_group.py:163 msgid "create" msgstr "créer" #. Subcommand description ("inbox create") -#: src/theticketbot/cogs/inbox/cog_group.py:164 +#: src/theticketbot/cogs/inbox/cog_group.py:165 msgid "Create a new inbox." msgstr "Créer un nouveau panel." #. Subcommand parameter name ("inbox create") #. Subcommand parameter name ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:168 -#: src/theticketbot/cogs/inbox/cog_group.py:340 +#: src/theticketbot/cogs/inbox/cog_group.py:169 +#: src/theticketbot/cogs/inbox/cog_group.py:350 msgid "channel" msgstr "canal" #. Subcommand parameter name ("inbox create") #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:170 -#: src/theticketbot/cogs/inbox/cog_group.py:334 +#: src/theticketbot/cogs/inbox/cog_group.py:171 +#: src/theticketbot/cogs/inbox/cog_group.py:344 msgid "destination" msgstr "" #. Subcommand parameter description ("inbox create ") -#: src/theticketbot/cogs/inbox/cog_group.py:174 +#: src/theticketbot/cogs/inbox/cog_group.py:175 msgid "The channel to post the inbox." msgstr "Le canal où poster le panel." #. Subcommand parameter description ("inbox create ") #. Subcommand parameter description ("inbox destination ") -#: src/theticketbot/cogs/inbox/cog_group.py:176 -#: src/theticketbot/cogs/inbox/cog_group.py:344 +#: src/theticketbot/cogs/inbox/cog_group.py:177 +#: src/theticketbot/cogs/inbox/cog_group.py:354 #, fuzzy msgid "The channel to route new tickets." msgstr "Le canal où poster le panel." @@ -194,7 +194,7 @@ msgstr "Le canal où poster le panel." #. and the inbox needs a message to be included #. {0}: the channel's mention #. {1}: the destination's mention -#: src/theticketbot/cogs/inbox/cog_group.py:195 +#: src/theticketbot/cogs/inbox/cog_group.py:205 #, fuzzy, python-brace-format msgid "" "Your inbox will be posted in {0} and tickets will be created in {1}. You " @@ -209,7 +209,7 @@ msgstr "" "*Sélectionner ce message*." #. The default starter message content for new tickets -#: src/theticketbot/cogs/inbox/cog_group.py:248 +#: src/theticketbot/cogs/inbox/cog_group.py:258 msgid "" "$author Thank you for creating a ticket!\n" "$staff" @@ -219,14 +219,14 @@ msgstr "" #. Message sent after a user creates an inbox #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:267 +#: src/theticketbot/cogs/inbox/cog_group.py:277 #, python-brace-format msgid "Your inbox has been created! {0}" msgstr "Votre panel a été créée ! {0}" #. Message sent when attempting to create an inbox with too large attachments #. {0}: the maximum cumulative filesize -#: src/theticketbot/cogs/inbox/cog_group.py:289 +#: src/theticketbot/cogs/inbox/cog_group.py:299 #, python-brace-format msgid "" "The message's attachments are too large! The total size must be under {0}." @@ -235,7 +235,7 @@ msgstr "" "à {0}." #. Subcommand description ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:336 +#: src/theticketbot/cogs/inbox/cog_group.py:346 #, fuzzy msgid "Edit the destination channel for an inbox." msgstr "Édition du message pour un panel." @@ -248,10 +248,10 @@ msgstr "Édition du message pour un panel." #. and an inbox needs to be selected #. Message sent when a user is changing the name for new tickets, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:355 -#: src/theticketbot/cogs/inbox/cog_group.py:409 -#: src/theticketbot/cogs/inbox/cog_group.py:533 -#: src/theticketbot/cogs/inbox/cog_group.py:562 +#: src/theticketbot/cogs/inbox/cog_group.py:369 +#: src/theticketbot/cogs/inbox/cog_group.py:423 +#: src/theticketbot/cogs/inbox/cog_group.py:547 +#: src/theticketbot/cogs/inbox/cog_group.py:576 msgid "" "You must now select the inbox you want to edit. To do this, right click or " "long tap a message, then open Apps and pick the *Select this message* " @@ -264,7 +264,7 @@ msgstr "" #. Message sent when an inbox's old and new destination are the same #. {0}: the inbox's link #. {1}: the destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:379 +#: src/theticketbot/cogs/inbox/cog_group.py:393 #, python-brace-format msgid "{0} is already routing tickets to {1} !" msgstr "" @@ -273,32 +273,32 @@ msgstr "" #. {0}: the inbox's link #. {1}: the old destination's link #. {2}: the new destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:394 +#: src/theticketbot/cogs/inbox/cog_group.py:408 #, python-brace-format msgid "{0} will now route tickets to {2} instead of {1} !" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:401 +#: src/theticketbot/cogs/inbox/cog_group.py:415 msgid "message" msgstr "message" #. Subcommand description ("inbox message") -#: src/theticketbot/cogs/inbox/cog_group.py:403 +#: src/theticketbot/cogs/inbox/cog_group.py:417 msgid "Edit the message for an inbox." msgstr "Édition du message pour un panel." #. Message sent when a user is editing an inbox's message, #. and a second message needs to be selected to copy its contents #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:429 +#: src/theticketbot/cogs/inbox/cog_group.py:443 #, python-brace-format msgid "{0} will be edited. Please select the message you want to copy." msgstr "" "{0} sera édité. Veuillez sélectionner le message que vous souhaitez copier." #. Message sent when a user tries to edit an inbox message with itself -#: src/theticketbot/cogs/inbox/cog_group.py:447 +#: src/theticketbot/cogs/inbox/cog_group.py:461 msgid "" "The inbox message cannot be edited with itself. Please select another " "message you want to copy." @@ -308,24 +308,24 @@ msgstr "" #. Message sent after a user edits an inbox's message #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:471 +#: src/theticketbot/cogs/inbox/cog_group.py:485 #, python-brace-format msgid "{0} has been updated!" msgstr "{0} a été mis à jour !" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:477 +#: src/theticketbot/cogs/inbox/cog_group.py:491 msgid "staff" msgstr "équipe" #. Subcommand description ("inbox staff") -#: src/theticketbot/cogs/inbox/cog_group.py:479 +#: src/theticketbot/cogs/inbox/cog_group.py:493 msgid "Manage staff for an inbox." msgstr "Gérer l'équipe associée à un panel." #. Message sent when a user is managing staff for an inbox, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:485 +#: src/theticketbot/cogs/inbox/cog_group.py:499 msgid "" "You must now select the inbox you want to manage staff for. To do this, " "right click or long tap a message, then open Apps and pick the *Select this " @@ -338,38 +338,38 @@ msgstr "" #. Message sent above select menus when presenting an inbox's staff #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:505 +#: src/theticketbot/cogs/inbox/cog_group.py:519 #, python-brace-format msgid "Staff for {0} :" msgstr "Équipe pour {0} :" #. Subcommand group name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:518 +#: src/theticketbot/cogs/inbox/cog_group.py:532 msgid "new-tickets" msgstr "nouveaux-tickets" #. Subcommand group description ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:520 +#: src/theticketbot/cogs/inbox/cog_group.py:534 msgid "Manage new tickets created by an inbox." msgstr "Gérer les nouveaux tickets créés par un panel." #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:525 +#: src/theticketbot/cogs/inbox/cog_group.py:539 msgid "starter" msgstr "démarrer" #. Subcommand description ("inbox new-tickets starter") -#: src/theticketbot/cogs/inbox/cog_group.py:527 +#: src/theticketbot/cogs/inbox/cog_group.py:541 msgid "Set the starting message for new tickets." msgstr "Choisir le message de démarrage pour les nouveaux tickets." #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:554 +#: src/theticketbot/cogs/inbox/cog_group.py:568 msgid "name" msgstr "nom" #. Subcommand description ("inbox new-tickets name") -#: src/theticketbot/cogs/inbox/cog_group.py:556 +#: src/theticketbot/cogs/inbox/cog_group.py:570 msgid "Set the name for new tickets." msgstr "Sélectionner le nom pour les nouveaux tickets." diff --git a/src/theticketbot/theticketbot.pot b/src/theticketbot/theticketbot.pot index ece2b52..f90e047 100644 --- a/src/theticketbot/theticketbot.pot +++ b/src/theticketbot/theticketbot.pot @@ -30,7 +30,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.4.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-07-01 16:38-0400\n" +"POT-Creation-Date: 2024-07-01 22:44-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -106,26 +106,26 @@ msgstr "" #. Command group name #. (alternatively translated as "panel") -#: src/theticketbot/cogs/inbox/cog_group.py:62 +#: src/theticketbot/cogs/inbox/cog_group.py:68 msgid "inbox" msgstr "" #. Command group description ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:64 +#: src/theticketbot/cogs/inbox/cog_group.py:70 msgid "Manage the server's ticket inboxes." msgstr "" #. Message sent when selecting a non-inbox message #. that looks like the message used to be an inbox #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:122 +#: src/theticketbot/cogs/inbox/cog_group.py:128 #, python-brace-format msgid "Sorry, {0} is no longer recognized as an inbox and must be re-created." msgstr "" #. Message sent when selecting a non-inbox message #. {0}: the message's link -#: src/theticketbot/cogs/inbox/cog_group.py:129 +#: src/theticketbot/cogs/inbox/cog_group.py:135 #, python-brace-format msgid "" "Sorry, {0} is not an inbox. The message you select should have a **Create " @@ -135,44 +135,44 @@ msgstr "" #. Message sent when attempting to create an inbox with insufficient permissions #. {0}: the channel's mention #. {1}: a list of permissions that are missing -#: src/theticketbot/cogs/inbox/cog_group.py:155 +#: src/theticketbot/cogs/inbox/cog_group.py:156 #, python-brace-format msgid "I need the following permissions in {0}: {1}" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:162 +#: src/theticketbot/cogs/inbox/cog_group.py:163 msgid "create" msgstr "" #. Subcommand description ("inbox create") -#: src/theticketbot/cogs/inbox/cog_group.py:164 +#: src/theticketbot/cogs/inbox/cog_group.py:165 msgid "Create a new inbox." msgstr "" #. Subcommand parameter name ("inbox create") #. Subcommand parameter name ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:168 -#: src/theticketbot/cogs/inbox/cog_group.py:340 +#: src/theticketbot/cogs/inbox/cog_group.py:169 +#: src/theticketbot/cogs/inbox/cog_group.py:350 msgid "channel" msgstr "" #. Subcommand parameter name ("inbox create") #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:170 -#: src/theticketbot/cogs/inbox/cog_group.py:334 +#: src/theticketbot/cogs/inbox/cog_group.py:171 +#: src/theticketbot/cogs/inbox/cog_group.py:344 msgid "destination" msgstr "" #. Subcommand parameter description ("inbox create ") -#: src/theticketbot/cogs/inbox/cog_group.py:174 +#: src/theticketbot/cogs/inbox/cog_group.py:175 msgid "The channel to post the inbox." msgstr "" #. Subcommand parameter description ("inbox create ") #. Subcommand parameter description ("inbox destination ") -#: src/theticketbot/cogs/inbox/cog_group.py:176 -#: src/theticketbot/cogs/inbox/cog_group.py:344 +#: src/theticketbot/cogs/inbox/cog_group.py:177 +#: src/theticketbot/cogs/inbox/cog_group.py:354 msgid "The channel to route new tickets." msgstr "" @@ -180,7 +180,7 @@ msgstr "" #. and the inbox needs a message to be included #. {0}: the channel's mention #. {1}: the destination's mention -#: src/theticketbot/cogs/inbox/cog_group.py:195 +#: src/theticketbot/cogs/inbox/cog_group.py:205 #, python-brace-format msgid "" "Your inbox will be posted in {0} and tickets will be created in {1}. You " @@ -190,7 +190,7 @@ msgid "" msgstr "" #. The default starter message content for new tickets -#: src/theticketbot/cogs/inbox/cog_group.py:248 +#: src/theticketbot/cogs/inbox/cog_group.py:258 msgid "" "$author Thank you for creating a ticket!\n" "$staff" @@ -198,21 +198,21 @@ msgstr "" #. Message sent after a user creates an inbox #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:267 +#: src/theticketbot/cogs/inbox/cog_group.py:277 #, python-brace-format msgid "Your inbox has been created! {0}" msgstr "" #. Message sent when attempting to create an inbox with too large attachments #. {0}: the maximum cumulative filesize -#: src/theticketbot/cogs/inbox/cog_group.py:289 +#: src/theticketbot/cogs/inbox/cog_group.py:299 #, python-brace-format msgid "" "The message's attachments are too large! The total size must be under {0}." msgstr "" #. Subcommand description ("inbox destination") -#: src/theticketbot/cogs/inbox/cog_group.py:336 +#: src/theticketbot/cogs/inbox/cog_group.py:346 msgid "Edit the destination channel for an inbox." msgstr "" @@ -224,10 +224,10 @@ msgstr "" #. and an inbox needs to be selected #. Message sent when a user is changing the name for new tickets, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:355 -#: src/theticketbot/cogs/inbox/cog_group.py:409 -#: src/theticketbot/cogs/inbox/cog_group.py:533 -#: src/theticketbot/cogs/inbox/cog_group.py:562 +#: src/theticketbot/cogs/inbox/cog_group.py:369 +#: src/theticketbot/cogs/inbox/cog_group.py:423 +#: src/theticketbot/cogs/inbox/cog_group.py:547 +#: src/theticketbot/cogs/inbox/cog_group.py:576 msgid "" "You must now select the inbox you want to edit. To do this, right click or " "long tap a message, then open Apps and pick the *Select this message* " @@ -237,7 +237,7 @@ msgstr "" #. Message sent when an inbox's old and new destination are the same #. {0}: the inbox's link #. {1}: the destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:379 +#: src/theticketbot/cogs/inbox/cog_group.py:393 #, python-brace-format msgid "{0} is already routing tickets to {1} !" msgstr "" @@ -246,31 +246,31 @@ msgstr "" #. {0}: the inbox's link #. {1}: the old destination's link #. {2}: the new destination's link -#: src/theticketbot/cogs/inbox/cog_group.py:394 +#: src/theticketbot/cogs/inbox/cog_group.py:408 #, python-brace-format msgid "{0} will now route tickets to {2} instead of {1} !" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:401 +#: src/theticketbot/cogs/inbox/cog_group.py:415 msgid "message" msgstr "" #. Subcommand description ("inbox message") -#: src/theticketbot/cogs/inbox/cog_group.py:403 +#: src/theticketbot/cogs/inbox/cog_group.py:417 msgid "Edit the message for an inbox." msgstr "" #. Message sent when a user is editing an inbox's message, #. and a second message needs to be selected to copy its contents #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:429 +#: src/theticketbot/cogs/inbox/cog_group.py:443 #, python-brace-format msgid "{0} will be edited. Please select the message you want to copy." msgstr "" #. Message sent when a user tries to edit an inbox message with itself -#: src/theticketbot/cogs/inbox/cog_group.py:447 +#: src/theticketbot/cogs/inbox/cog_group.py:461 msgid "" "The inbox message cannot be edited with itself. Please select another " "message you want to copy." @@ -278,24 +278,24 @@ msgstr "" #. Message sent after a user edits an inbox's message #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:471 +#: src/theticketbot/cogs/inbox/cog_group.py:485 #, python-brace-format msgid "{0} has been updated!" msgstr "" #. Subcommand name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:477 +#: src/theticketbot/cogs/inbox/cog_group.py:491 msgid "staff" msgstr "" #. Subcommand description ("inbox staff") -#: src/theticketbot/cogs/inbox/cog_group.py:479 +#: src/theticketbot/cogs/inbox/cog_group.py:493 msgid "Manage staff for an inbox." msgstr "" #. Message sent when a user is managing staff for an inbox, #. and an inbox needs to be selected -#: src/theticketbot/cogs/inbox/cog_group.py:485 +#: src/theticketbot/cogs/inbox/cog_group.py:499 msgid "" "You must now select the inbox you want to manage staff for. To do this, " "right click or long tap a message, then open Apps and pick the *Select this " @@ -304,38 +304,38 @@ msgstr "" #. Message sent above select menus when presenting an inbox's staff #. {0}: the inbox's link -#: src/theticketbot/cogs/inbox/cog_group.py:505 +#: src/theticketbot/cogs/inbox/cog_group.py:519 #, python-brace-format msgid "Staff for {0} :" msgstr "" #. Subcommand group name ("inbox") -#: src/theticketbot/cogs/inbox/cog_group.py:518 +#: src/theticketbot/cogs/inbox/cog_group.py:532 msgid "new-tickets" msgstr "" #. Subcommand group description ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:520 +#: src/theticketbot/cogs/inbox/cog_group.py:534 msgid "Manage new tickets created by an inbox." msgstr "" #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:525 +#: src/theticketbot/cogs/inbox/cog_group.py:539 msgid "starter" msgstr "" #. Subcommand description ("inbox new-tickets starter") -#: src/theticketbot/cogs/inbox/cog_group.py:527 +#: src/theticketbot/cogs/inbox/cog_group.py:541 msgid "Set the starting message for new tickets." msgstr "" #. Subcommand name ("inbox new-tickets") -#: src/theticketbot/cogs/inbox/cog_group.py:554 +#: src/theticketbot/cogs/inbox/cog_group.py:568 msgid "name" msgstr "" #. Subcommand description ("inbox new-tickets name") -#: src/theticketbot/cogs/inbox/cog_group.py:556 +#: src/theticketbot/cogs/inbox/cog_group.py:570 msgid "Set the name for new tickets." msgstr ""