Skip to content

Commit

Permalink
[Gatekeep] Add new cog (#666)
Browse files Browse the repository at this point in the history
New cog to catch spam messages from first-time messages from recently joined accounts

* [Gatekeep] Initial commit of cog, should be ready to deploy

* Implemented changes properly, I got trolled by VSCode user interface

* Completed the remaining fixes for deployment

* [Gatekeep] Handled requests for 2025/02/09

* [Gatekeep] Fixed formatting for Tox style test

Lots of reformatting of the code to match the standards and conventions that the Tox style test. Hoping to not get a big fat red ❌ on my commit this time.

* [Gatekeep] Reformatted for Tox style test (again)

I swear to god these did not get flagged in the previous commit. Please do not give me the big fat red ❌ again
  • Loading branch information
Tsunderarislime authored Feb 13, 2025
1 parent c836434 commit 83b7a4d
Show file tree
Hide file tree
Showing 4 changed files with 576 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cogs/gatekeep/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Gatekeep cog
Designed to automatically detect scam accounts and ban those accounts
"""
import json
from pathlib import Path

from redbot.core.bot import Red
from .gatekeep import Gatekeep

with open(Path(__file__).parent / "info.json") as fp:
__red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"]


async def setup(bot: Red):
"""Add the cog to the bot."""
await bot.add_cog(Gatekeep(bot))
15 changes: 15 additions & 0 deletions cogs/gatekeep/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
KEY_LOG_CHANNEL = "logChannel"
KEY_THRESHOLD = "threshold"
KEY_NEW_USER_DAYS = "newUserDays"
KEY_ACTIVE = "active"
KEY_WORD_DICT = "wordDict"
KEY_WATCH_LIST = "watchList"

BASE_GUILD = {
KEY_LOG_CHANNEL: None,
KEY_THRESHOLD: 1000000,
KEY_NEW_USER_DAYS: 14,
KEY_ACTIVE: False,
KEY_WORD_DICT: {},
KEY_WATCH_LIST: [],
}
Loading

0 comments on commit 83b7a4d

Please sign in to comment.