1
This commit is contained in:
parent
d3587381cc
commit
682f40bb1b
2 changed files with 6 additions and 3 deletions
|
@ -6,7 +6,7 @@ from redbot.core import commands, Config
|
||||||
class FilterCog(commands.Cog):
|
class FilterCog(commands.Cog):
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.config = Config.get_conf(self, identifier=1234567890)
|
self.config = Config.get_conf(self, identifier=1234567890, force_registration=True)
|
||||||
self.config.register_global(
|
self.config.register_global(
|
||||||
phrases=[],
|
phrases=[],
|
||||||
words=[],
|
words=[],
|
||||||
|
@ -26,6 +26,10 @@ class FilterCog(commands.Cog):
|
||||||
offenseExpireMinutes=60
|
offenseExpireMinutes=60
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@commands.Cog.listener()
|
||||||
|
async def on_ready(self):
|
||||||
|
print(f"{self.__class__.__name__} cog has been loaded.")
|
||||||
|
|
||||||
async def send_log(self, log_channel_id, message):
|
async def send_log(self, log_channel_id, message):
|
||||||
log_channel = self.bot.get_channel(log_channel_id)
|
log_channel = self.bot.get_channel(log_channel_id)
|
||||||
if log_channel:
|
if log_channel:
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{
|
||||||
"author": ["Valerie"],
|
"author": ["MystixMew"],
|
||||||
"description": "A moderation cog that filters messages based on configured word lists.",
|
"description": "A moderation cog that filters messages based on configured word lists.",
|
||||||
"install_msg": "Thanks for installing the Filter Cog! Use `[p]help FilterCog` to get started.",
|
"install_msg": "Thanks for installing the Filter Cog! Use `[p]help FilterCog` to get started.",
|
||||||
"short": "Message filtering moderation cog.",
|
"short": "Message filtering moderation cog.",
|
||||||
"requirements": [],
|
|
||||||
"tags": ["moderation", "filter", "messages"],
|
"tags": ["moderation", "filter", "messages"],
|
||||||
"type": "COG"
|
"type": "COG"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue