Skip to content

Commit afaf135

Browse files
committed
refactor: Remove ATL plugins and update configuration and snippet modules.
1 parent e427c85 commit afaf135

File tree

13 files changed

+29
-1493
lines changed

13 files changed

+29
-1493
lines changed

config/config.json.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
}
9393
},
9494
"SNIPPETS": {
95+
"ENABLED": true,
9596
"LIMIT_TO_ROLE_IDS": false,
9697
"ACCESS_ROLE_IDS": [
9798
123456789012345678,

src/tux/modules/moderation/snippetban.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from tux.core.checks import requires_command_permission
1212
from tux.core.flags import SnippetBanFlags
1313
from tux.database.models import CaseType
14+
from tux.shared.config import CONFIG
1415

1516
from . import ModerationCogBase
1617

@@ -32,6 +33,12 @@ def __init__(self, bot: Tux) -> None:
3233
"""
3334
super().__init__(bot)
3435

36+
if self.unload_if_missing_config(
37+
condition=not CONFIG.SNIPPETS.ENABLED,
38+
config_name="SNIPPETS",
39+
):
40+
return
41+
3542
@commands.hybrid_command(
3643
name="snippetban",
3744
aliases=["sb"],

src/tux/modules/moderation/snippetunban.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from tux.core.checks import requires_command_permission
1212
from tux.core.flags import SnippetUnbanFlags
1313
from tux.database.models import CaseType
14+
from tux.shared.config import CONFIG
1415

1516
from . import ModerationCogBase
1617

@@ -32,6 +33,12 @@ def __init__(self, bot: Tux) -> None:
3233
"""
3334
super().__init__(bot)
3435

36+
if self.unload_if_missing_config(
37+
condition=not CONFIG.SNIPPETS.ENABLED,
38+
config_name="SNIPPETS",
39+
):
40+
return
41+
3542
@commands.hybrid_command(
3643
name="snippetunban",
3744
aliases=["sub"],

src/tux/modules/snippets/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ def __init__(self, bot: Tux) -> None:
3232
"""
3333
super().__init__(bot)
3434

35+
if self.unload_if_missing_config(
36+
condition=not CONFIG.SNIPPETS.ENABLED,
37+
config_name="SNIPPETS",
38+
):
39+
return
40+
3541
async def is_snippetbanned(self, guild_id: int, user_id: int) -> bool:
3642
"""Check if a user is currently snippet banned in a guild.
3743

src/tux/plugins/atl/deepfry.py

Lines changed: 0 additions & 260 deletions
This file was deleted.

0 commit comments

Comments
 (0)