This commit is contained in:
Valerie 2025-02-22 20:34:46 -05:00
parent d3587381cc
commit 682f40bb1b
2 changed files with 6 additions and 3 deletions

View file

@ -6,7 +6,7 @@ from redbot.core import commands, Config
class FilterCog(commands.Cog):
def __init__(self, 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(
phrases=[],
words=[],
@ -26,6 +26,10 @@ class FilterCog(commands.Cog):
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):
log_channel = self.bot.get_channel(log_channel_id)
if log_channel:

View file

@ -1,9 +1,8 @@
{
"author": ["Valerie"],
"author": ["MystixMew"],
"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.",
"short": "Message filtering moderation cog.",
"requirements": [],
"tags": ["moderation", "filter", "messages"],
"type": "COG"
}