feat(commands:mute|Mod): add mute/unmute command

This commit is contained in:
Romain J 2021-05-17 00:08:16 +02:00
parent 2978706264
commit 7b50af0207
12 changed files with 115 additions and 43 deletions

View file

@ -55,6 +55,7 @@
<w>suivante</w> <w>suivante</w>
<w>systemd</w> <w>systemd</w>
<w>tablename</w> <w>tablename</w>
<w>tempmute</w>
<w>tldr</w> <w>tldr</w>
<w>tutux</w> <w>tutux</w>
<w>tuxbot</w> <w>tuxbot</w>

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,21 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Custom/custom.py:63 #: tuxbot/cogs/Custom/custom.py:64
#, python-brace-format #, python-brace-format
msgid "Locale changed for you to {lang} successfully" msgid "Locale changed for you to {lang} successfully"
msgstr "" msgstr ""
#: tuxbot/cogs/Custom/custom.py:70 #: tuxbot/cogs/Custom/custom.py:71
msgid "List of available locales: " msgid "List of available locales: "
msgstr "" msgstr ""
#: tuxbot/cogs/Custom/custom.py:93 #: tuxbot/cogs/Custom/custom.py:94
#, python-brace-format #, python-brace-format
msgid "The alias `{alias}` is already defined for the command `{command}`" msgid "The alias `{alias}` is already defined for the command `{command}`"
msgstr "" msgstr ""
#: tuxbot/cogs/Custom/custom.py:106 #: tuxbot/cogs/Custom/custom.py:107
#, python-brace-format #, python-brace-format
msgid "The alias `{alias}` for the command `{command}` was successfully created" msgid "The alias `{alias}` for the command `{command}` was successfully created"
msgstr "" msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -66,6 +66,19 @@ msgid ""
"{}" "{}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:287 tuxbot/cogs/Mod/mod.py:383
msgid "Missing members"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:294 tuxbot/cogs/Mod/mod.py:320
#: tuxbot/cogs/Mod/mod.py:390
msgid "No mute role has been specified for this guild"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:346
msgid "Mute role successfully defined"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:22 #: tuxbot/cogs/Mod/functions/converters.py:22
msgid "Unknown rule" msgid "Unknown rule"
msgstr "" msgstr ""
@ -81,3 +94,7 @@ msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:53 #: tuxbot/cogs/Mod/functions/converters.py:53
msgid "Please provide a message in this guild" msgid "Please provide a message in this guild"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:62
msgid "Reason length must be 300 characters or lower."
msgstr ""

View file

@ -75,6 +75,19 @@ msgstr ""
"La règle suivante a été supprimée: \n" "La règle suivante a été supprimée: \n"
"{}" "{}"
#: tuxbot/cogs/Mod/mod.py:287 tuxbot/cogs/Mod/mod.py:383
msgid "Missing members"
msgstr "Membres inexistants"
#: tuxbot/cogs/Mod/mod.py:294 tuxbot/cogs/Mod/mod.py:320
#: tuxbot/cogs/Mod/mod.py:390
msgid "No mute role has been specified for this guild"
msgstr "Aucun rôle mute n'a été spécifié pour ce serveur"
#: tuxbot/cogs/Mod/mod.py:346
msgid "Mute role successfully defined"
msgstr "Rôle mute défini avec succès"
#: tuxbot/cogs/Mod/functions/converters.py:22 #: tuxbot/cogs/Mod/functions/converters.py:22
msgid "Unknown rule" msgid "Unknown rule"
msgstr "Règle inconnue" msgstr "Règle inconnue"
@ -89,4 +102,8 @@ msgstr "Merci de donner un de mes messages"
#: tuxbot/cogs/Mod/functions/converters.py:53 #: tuxbot/cogs/Mod/functions/converters.py:53
msgid "Please provide a message in this guild" msgid "Please provide a message in this guild"
msgstr "Merci de donner un message dans ce serveur" msgstr "Merci de donner un message dans ce serveur"
#: tuxbot/cogs/Mod/functions/converters.py:62
msgid "Reason length must be 300 characters or lower."
msgstr "La raison doit faire 300 characters ou moins"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,68 +17,85 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Mod/mod.py:75 #: tuxbot/cogs/Mod/mod.py:81
#, python-brace-format #, python-brace-format
msgid "Locale changed to {lang} successfully" msgid "Locale changed to {lang} successfully"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:86 #: tuxbot/cogs/Mod/mod.py:92
msgid "List of available locales: " msgid "List of available locales: "
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:111 #: tuxbot/cogs/Mod/mod.py:117
msgid "" msgid ""
"{}please read the following rule: \n" "{}please read the following rule: \n"
"{}" "{}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:129 tuxbot/cogs/Mod/mod.py:229 #: tuxbot/cogs/Mod/mod.py:135 tuxbot/cogs/Mod/mod.py:237
msgid "No rules found for this server" msgid "No rules found for this server"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:133 tuxbot/cogs/Mod/mod.py:233 #: tuxbot/cogs/Mod/mod.py:139 tuxbot/cogs/Mod/mod.py:241
msgid "Rules for {}" msgid "Rules for {}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:139 tuxbot/cogs/Mod/mod.py:239 #: tuxbot/cogs/Mod/mod.py:145 tuxbot/cogs/Mod/mod.py:247
msgid "Latest change: {}" msgid "Latest change: {}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:153 tuxbot/cogs/Mod/mod.py:253 #: tuxbot/cogs/Mod/mod.py:159 tuxbot/cogs/Mod/mod.py:264
msgid "Rules for {} ({}/{})" msgid "Rules for {} ({}/{})"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:172 #: tuxbot/cogs/Mod/mod.py:180
msgid "" msgid ""
"Following rule added: \n" "Following rule added: \n"
"{}" "{}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:195 #: tuxbot/cogs/Mod/mod.py:203
msgid "" msgid ""
"Following rule updated: \n" "Following rule updated: \n"
"{}" "{}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/mod.py:213 #: tuxbot/cogs/Mod/mod.py:221
msgid "" msgid ""
"Following rule deleted: \n" "Following rule deleted: \n"
"{}" "{}"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:20 #: tuxbot/cogs/Mod/mod.py:287 tuxbot/cogs/Mod/mod.py:383
#: tuxbot/cogs/Mod/functions/converters.py:27 msgid "Missing members"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:294 tuxbot/cogs/Mod/mod.py:320
#: tuxbot/cogs/Mod/mod.py:390
msgid "No mute role has been specified for this guild"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:346
msgid "Mute role successfully defined"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:21
#: tuxbot/cogs/Mod/functions/converters.py:28
msgid "Unknown rule" msgid "Unknown rule"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:36 #: tuxbot/cogs/Mod/functions/converters.py:37
msgid "Rule length must be 300 characters or lower." msgid "Rule length must be 300 characters or lower."
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:50 #: tuxbot/cogs/Mod/functions/converters.py:51
msgid "Please provide one of my message" msgid "Please provide one of my message"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:53 #: tuxbot/cogs/Mod/functions/converters.py:54
msgid "Please provide a message in this guild" msgid "Please provide a message in this guild"
msgstr "" msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:62
msgid "Reason length must be 300 characters or lower."
msgstr ""

View file

@ -346,6 +346,26 @@ class Mod(commands.Cog):
_("Mute role successfully defined", ctx, self.bot.config) _("Mute role successfully defined", ctx, self.bot.config)
) )
# =========================================================================
@command_extra(
name="tempmute",
deletable=True,
)
@commands.guild_only()
@checks.is_admin()
async def _tempmute(
self,
ctx: ContextPlus,
time,
members: discord.Member,
*,
reason: ReasonConverter,
):
...
# =========================================================================
@command_extra( @command_extra(
name="unmute", name="unmute",
deletable=True, deletable=True,

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -26,65 +26,65 @@ msgstr ""
msgid "IP address {ip_address} is already defined as Private-Use Networks via RFC 1918." msgid "IP address {ip_address} is already defined as Private-Use Networks via RFC 1918."
msgstr "" msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:265 #: tuxbot/cogs/Network/functions/utils.py:284
msgid "Invalid ip version" msgid "Invalid ip version"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:287 #: tuxbot/cogs/Network/functions/utils.py:306
msgid "Supported queries : A, AAAA, CNAME, NS, DS, DNSKEY, SOA, TXT, PTR, MX" msgid "Supported queries : A, AAAA, CNAME, NS, DS, DNSKEY, SOA, TXT, PTR, MX"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:296 #: tuxbot/cogs/Network/functions/utils.py:315
msgid "Invalid ASN provided" msgid "Invalid ASN provided"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:137 #: tuxbot/cogs/Network/network.py:139
#, python-brace-format #, python-brace-format
msgid "Information for ``{ip} ({ip_address})``" msgid "Information for ``{ip} ({ip_address})``"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:143 #: tuxbot/cogs/Network/network.py:145
msgid "Belongs to:" msgid "Belongs to:"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:153 #: tuxbot/cogs/Network/network.py:155
msgid "Region:" msgid "Region:"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:161 #: tuxbot/cogs/Network/network.py:163
#, python-brace-format #, python-brace-format
msgid "Hostname: {hostname}" msgid "Hostname: {hostname}"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:205 #: tuxbot/cogs/Network/network.py:207
msgid "Unable to collect information through CloudFlare" msgid "Unable to collect information through CloudFlare"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:250 #: tuxbot/cogs/Network/network.py:252
msgid "[show all]({})" msgid "[show all]({})"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:264 tuxbot/cogs/Network/network.py:337 #: tuxbot/cogs/Network/network.py:266 tuxbot/cogs/Network/network.py:339
msgid "Cannot connect to host {}" msgid "Cannot connect to host {}"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:289 #: tuxbot/cogs/Network/network.py:291
msgid "No result..." msgid "No result..."
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:321 #: tuxbot/cogs/Network/network.py:323
msgid "Up!" msgid "Up!"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:324 #: tuxbot/cogs/Network/network.py:326
msgid "Down..." msgid "Down..."
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:353 #: tuxbot/cogs/Network/network.py:355
msgid "Please retry in few minutes" msgid "Please retry in few minutes"
msgstr "" msgstr ""
#: tuxbot/cogs/Network/network.py:367 #: tuxbot/cogs/Network/network.py:369
#, python-brace-format #, python-brace-format
msgid "AS{asn} could not be found in PeeringDB's database." msgid "AS{asn} could not be found in PeeringDB's database."
msgstr "" msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tuxbot-bot\n" "Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n" "Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-05-16 15:11+0200\n" "POT-Creation-Date: 2021-05-17 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"