mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Mod] Improved filter's help (#2357)
Co-authored-by: Iangit1 <43935737+Iangit1@users.noreply.github.com>
This commit is contained in:
parent
a42c4fb215
commit
7d4e5fd390
10
cogs/mod.py
10
cogs/mod.py
@ -1134,7 +1134,9 @@ class Mod:
|
||||
|
||||
Use double quotes to add/remove sentences
|
||||
Using this command with no subcommands will send
|
||||
the list of the server's filtered words."""
|
||||
the list of the server's filtered words.
|
||||
Bot owners, server owners and mods / admins are immune
|
||||
to the filter"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
server = ctx.message.server
|
||||
@ -1161,6 +1163,9 @@ class Mod:
|
||||
await self.bot.send_cmd_help(ctx)
|
||||
return
|
||||
server = ctx.message.server
|
||||
explanation = ("Please note: the filter will only work in channels "
|
||||
"where the bot has the `manage_messages` "
|
||||
"permission.")
|
||||
added = 0
|
||||
if server.id not in self.filter.keys():
|
||||
self.filter[server.id] = []
|
||||
@ -1170,7 +1175,8 @@ class Mod:
|
||||
added += 1
|
||||
if added:
|
||||
dataIO.save_json("data/mod/filter.json", self.filter)
|
||||
await self.bot.say("Words added to filter.")
|
||||
await self.bot.say("Words added to filter.\n" +
|
||||
explanation)
|
||||
else:
|
||||
await self.bot.say("Words already in the filter.")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user