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>systemd</w>
<w>tablename</w>
<w>tempmute</w>
<w>tldr</w>
<w>tutux</w>
<w>tuxbot</w>

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,21 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Custom/custom.py:63
#: tuxbot/cogs/Custom/custom.py:64
#, python-brace-format
msgid "Locale changed for you to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Custom/custom.py:70
#: tuxbot/cogs/Custom/custom.py:71
msgid "List of available locales: "
msgstr ""
#: tuxbot/cogs/Custom/custom.py:93
#: tuxbot/cogs/Custom/custom.py:94
#, python-brace-format
msgid "The alias `{alias}` is already defined for the command `{command}`"
msgstr ""
#: tuxbot/cogs/Custom/custom.py:106
#: tuxbot/cogs/Custom/custom.py:107
#, python-brace-format
msgid "The alias `{alias}` for the command `{command}` was successfully created"
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -66,6 +66,19 @@ msgid ""
"{}"
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
msgid "Unknown rule"
msgstr ""
@ -81,3 +94,7 @@ msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:53
msgid "Please provide a message in this guild"
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"
"{}"
#: 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
msgid "Unknown rule"
msgstr "Règle inconnue"
@ -90,3 +103,7 @@ msgstr "Merci de donner un de mes messages"
#: tuxbot/cogs/Mod/functions/converters.py:53
msgid "Please provide a message in this guild"
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 ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,68 +17,85 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Mod/mod.py:75
#: tuxbot/cogs/Mod/mod.py:81
#, python-brace-format
msgid "Locale changed to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:86
#: tuxbot/cogs/Mod/mod.py:92
msgid "List of available locales: "
msgstr ""
#: tuxbot/cogs/Mod/mod.py:111
#: tuxbot/cogs/Mod/mod.py:117
msgid ""
"{}please read the following rule: \n"
"{}"
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"
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 {}"
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: {}"
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 {} ({}/{})"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:172
#: tuxbot/cogs/Mod/mod.py:180
msgid ""
"Following rule added: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:195
#: tuxbot/cogs/Mod/mod.py:203
msgid ""
"Following rule updated: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/mod.py:213
#: tuxbot/cogs/Mod/mod.py:221
msgid ""
"Following rule deleted: \n"
"{}"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:20
#: tuxbot/cogs/Mod/functions/converters.py:27
#: 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:21
#: tuxbot/cogs/Mod/functions/converters.py:28
msgid "Unknown rule"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:36
#: tuxbot/cogs/Mod/functions/converters.py:37
msgid "Rule length must be 300 characters or lower."
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:50
#: tuxbot/cogs/Mod/functions/converters.py:51
msgid "Please provide one of my message"
msgstr ""
#: tuxbot/cogs/Mod/functions/converters.py:53
#: tuxbot/cogs/Mod/functions/converters.py:54
msgid "Please provide a message in this guild"
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)
)
# =========================================================================
@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(
name="unmute",
deletable=True,

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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."
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:265
#: tuxbot/cogs/Network/functions/utils.py:284
msgid "Invalid ip version"
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"
msgstr ""
#: tuxbot/cogs/Network/functions/utils.py:296
#: tuxbot/cogs/Network/functions/utils.py:315
msgid "Invalid ASN provided"
msgstr ""
#: tuxbot/cogs/Network/network.py:137
#: tuxbot/cogs/Network/network.py:139
#, python-brace-format
msgid "Information for ``{ip} ({ip_address})``"
msgstr ""
#: tuxbot/cogs/Network/network.py:143
#: tuxbot/cogs/Network/network.py:145
msgid "Belongs to:"
msgstr ""
#: tuxbot/cogs/Network/network.py:153
#: tuxbot/cogs/Network/network.py:155
msgid "Region:"
msgstr ""
#: tuxbot/cogs/Network/network.py:161
#: tuxbot/cogs/Network/network.py:163
#, python-brace-format
msgid "Hostname: {hostname}"
msgstr ""
#: tuxbot/cogs/Network/network.py:205
#: tuxbot/cogs/Network/network.py:207
msgid "Unable to collect information through CloudFlare"
msgstr ""
#: tuxbot/cogs/Network/network.py:250
#: tuxbot/cogs/Network/network.py:252
msgid "[show all]({})"
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 {}"
msgstr ""
#: tuxbot/cogs/Network/network.py:289
#: tuxbot/cogs/Network/network.py:291
msgid "No result..."
msgstr ""
#: tuxbot/cogs/Network/network.py:321
#: tuxbot/cogs/Network/network.py:323
msgid "Up!"
msgstr ""
#: tuxbot/cogs/Network/network.py:324
#: tuxbot/cogs/Network/network.py:326
msgid "Down..."
msgstr ""
#: tuxbot/cogs/Network/network.py:353
#: tuxbot/cogs/Network/network.py:355
msgid "Please retry in few minutes"
msgstr ""
#: tuxbot/cogs/Network/network.py:367
#: tuxbot/cogs/Network/network.py:369
#, python-brace-format
msgid "AS{asn} could not be found in PeeringDB's database."
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\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"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"