Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
f40c2df
Move new protect commands here
ajax146 Jan 13, 2024
27490cd
Move purge/paste
ajax146 Jan 13, 2024
9f9e99c
Add base of automod
ajax146 Jan 13, 2024
5007b22
Formatting
ajax146 Jan 13, 2024
af7b2ec
Improve automod framework
ajax146 Jan 13, 2024
642fbab
Update automod framework, add banlogger framework
ajax146 Jan 14, 2024
4f85d78
Rename file
ajax146 Jan 14, 2024
746735e
Write some of automod
ajax146 Jan 14, 2024
4307f6e
Add regex checks
ajax146 Jul 22, 2024
73c256e
Merge branch 'main' into ProtectTheSecond
ajax146 Jul 22, 2024
bb8a3f9
Formatting
ajax146 Jul 22, 2024
aabceab
Mostly finish automod
ajax146 Jul 22, 2024
91c08e5
Update purge
ajax146 Jul 22, 2024
5e9d47b
Improve automod
ajax146 Jul 23, 2024
7ea5942
Setup basic modlog logging, no commands
ajax146 Jul 23, 2024
0f50256
Add layout of report
ajax146 Jul 23, 2024
fda054c
Modlog commands done
ajax146 Jul 23, 2024
d55a39b
Formatting
ajax146 Jul 23, 2024
2ee4f6a
Formatting 2
ajax146 Jul 23, 2024
be05046
FOrmatting
ajax146 Jul 23, 2024
02d993a
Formatting
ajax146 Jul 23, 2024
8be5e93
Formatting
ajax146 Jul 23, 2024
dea76a2
warnings all/clear
ajax146 Jul 23, 2024
5a0e4a9
Report command
ajax146 Jul 23, 2024
6697956
Automod silent punishment and variable mute
ajax146 Jul 23, 2024
82305d8
Fix config
ajax146 Jul 23, 2024
985158d
Make more framework out of automod, fix modlog still running when dis…
ajax146 Jul 24, 2024
e0c2b6b
Some small changes and fixes
ajax146 Jul 24, 2024
706e676
Paste never fails, paste respected automod
ajax146 Jul 25, 2024
4f78110
Add automod to IRC
ajax146 Jul 25, 2024
0deda6a
Final features
ajax146 Jul 25, 2024
aaa7fd3
Formatting
ajax146 Jul 25, 2024
f69e3cc
Formatting
ajax146 Jul 25, 2024
c49218e
Removed print statement
ajax146 Jul 25, 2024
3ec1043
Merge branch 'main' into ProtectTheSecond
ajax146 Apr 27, 2025
a534edd
Fix some issues, rewrite note all
ajax146 Apr 27, 2025
625f314
Move some functions around, make whois have notes on page 2
ajax146 Apr 28, 2025
a44332c
Add warnings as page 3 in whois, fix some bugs
ajax146 Apr 28, 2025
b92b982
Update config location
ajax146 Apr 28, 2025
f271890
Invert warning order, flags on whois, fancy time stamps on whois
ajax146 Apr 28, 2025
6caf786
Small changes to whois.py
ajax146 Apr 28, 2025
3f698ce
rename function
ajax146 Apr 28, 2025
42dc6cb
Move around purge command
ajax146 Apr 28, 2025
5f910c7
remove unused imports
ajax146 Apr 28, 2025
566540c
Fix small bug
ajax146 Apr 28, 2025
aba5dbe
Docstring changes
ajax146 Apr 28, 2025
9bd0427
Small formatting changes
ajax146 Apr 28, 2025
d944230
Formatting, bug fixes
ajax146 Apr 28, 2025
a4877b3
Fix automod warning attribution
ajax146 Apr 28, 2025
725e48b
Fix modlog lookup bugs
ajax146 Apr 28, 2025
a31c526
Limit delete_days in ban to 7 days
ajax146 Apr 28, 2025
26f7717
fix docstring, ignore MDA002
ajax146 Apr 28, 2025
f683728
Check if modlog is enabled in modlog ban/unban
ajax146 Apr 28, 2025
090eb12
Cap reason at 500 characters
ajax146 Apr 28, 2025
6a849ed
Add mute duration to reason in response embed
ajax146 Apr 29, 2025
a6e82ba
Check permissions and enabled extensions in whois
ajax146 Apr 29, 2025
fc37280
Add try catch when looking up users in report
ajax146 Apr 29, 2025
db55e4b
fix note clear
ajax146 Apr 29, 2025
9dc56cb
Fix unrelated file
ajax146 Apr 29, 2025
4743862
Fix whois issue
ajax146 Apr 29, 2025
99001eb
Update techsupport_bot/commands/modlog.py
ajax146 Apr 29, 2025
9956732
Update except whois
ajax146 Apr 29, 2025
adfee94
Replace ban_days with ban_seconds
ajax146 Apr 29, 2025
f0cd09e
Update docstring
ajax146 Apr 29, 2025
61f74ff
Move ban detection, make it better
ajax146 Apr 29, 2025
364b56d
Fix check if banned function
ajax146 Apr 29, 2025
eec4107
Add default to the ban delete days config description
ajax146 Apr 29, 2025
a44cceb
Update techsupport_bot/commands/report.py
ajax146 Apr 29, 2025
8d6e0ff
Update techsupport_bot/commands/whois.py
ajax146 Apr 29, 2025
ff9cd01
Update techsupport_bot/commands/report.py
ajax146 Apr 29, 2025
e0d0850
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
6c80590
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
94a4d41
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
ec7bafa
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
225451b
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
a69e790
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
a8d75c1
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
59bc7a2
Update techsupport_bot/commands/moderator.py
ajax146 Apr 29, 2025
da3e3e6
Formatting changes
ajax146 Apr 29, 2025
5f120ed
You must have reader role to be writer for notes
ajax146 Apr 29, 2025
53741d8
Update module on whois command
ajax146 Apr 29, 2025
1f70d65
Fix shitty config causing bug
ajax146 Apr 29, 2025
de96e6f
Really fix reader/writer roles in notes
ajax146 Apr 29, 2025
3ffc9ef
Raise error chain
ajax146 Apr 29, 2025
2b34a39
Fix bug in application perm check
ajax146 Apr 30, 2025
c4ad546
use the right variable name
ajax146 Apr 30, 2025
5c7a8a6
Better whitespce
ajax146 Apr 30, 2025
174c4cb
Add length limit to report
ajax146 Apr 30, 2025
e4d1aba
Add timestamp to automod/command alerts
ajax146 Apr 30, 2025
cfc368c
Remove timedelta
ajax146 Apr 30, 2025
104e638
Move whois response defer
ajax146 Apr 30, 2025
2d09148
Update desc for notes set command
ajax146 Apr 30, 2025
7a785f7
Add jump to context to command usage alerts
ajax146 Apr 30, 2025
71a292e
Make mute respond instead of raise
ajax146 Apr 30, 2025
19cb032
Remove unused variable
ajax146 Apr 30, 2025
ea40871
Add return statements, make 500 character reason message consistent
ajax146 Apr 30, 2025
e7f6785
Fix protect command logging
ajax146 Apr 30, 2025
2d52682
Fix notes reader/writer in an actually smart way
ajax146 Apr 30, 2025
c8ea89a
Add empty line to flake8
ajax146 May 1, 2025
57294ba
Merge branch 'main' into ProtectTheSecond
dkay0670 May 3, 2025
9d8357f
Minor fixes
ajax146 May 4, 2025
d4eb0a7
Edit purge message to show how many were deleted
ajax146 May 4, 2025
77f74ea
Merge branch 'main' into ProtectTheSecond
ajax146 May 4, 2025
f309748
Merge branch 'main' into ProtectTheSecond
ajax146 May 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore = DCO010, DCO023, DOC503, DOC602, DOC603, E203, E501, E712, F401, F403, F821, W503
ignore = DCO010, DCO023, DOC503, DOC602, DOC603, MDA002, E203, E501, E712, F401, F403, F821, W503
style = google
skip-checking-short-docstrings = False
skip-checking-short-docstrings = False
3 changes: 3 additions & 0 deletions techsupport_bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ async def create_new_context_config(self: Self, guild_id: str) -> munch.Munch:
config_.rate_limit.enabled = False
config_.rate_limit.commands = 4
config_.rate_limit.time = 10
config_.moderation = munch.DefaultMunch(None)
config_.moderation.max_warnings = 3
config_.moderation.alert_channel = None

config_.extensions = extensions_config

Expand Down
4 changes: 4 additions & 0 deletions techsupport_bot/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Both app and prefix commands are in this module
"""

from .application import *
from .burn import *
from .conch import *
from .config import *
Expand All @@ -16,6 +17,9 @@
from .linter import *
from .listen import *
from .mock import *
from .moderator import *
from .modlog import *
from .notes import *
from .relay import *
from .roll import *
from .wyr import *
4 changes: 3 additions & 1 deletion techsupport_bot/commands/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def setup(bot: bot.TechSupportBot) -> None:
description=(
"The role IDs required to manage the applications (not required to apply)"
),
default=[""],
default=[],
)
config.add(
key="ping_role",
Expand Down Expand Up @@ -150,6 +150,8 @@ async def command_permission_check(interaction: discord.Interaction) -> bool:
# Gets permitted roles
allowed_roles = []
for role_id in config.extensions.application.manage_roles.value:
if not role_id:
continue
role = interaction.guild.get_role(int(role_id))
if not role:
continue
Expand Down
9 changes: 6 additions & 3 deletions techsupport_bot/commands/duck.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import munch
import ui
from botlogging import LogContext, LogLevel
from core import auxiliary, cogs, extensionconfig
from core import auxiliary, cogs, extensionconfig, moderation
from discord import Color as embed_colors
from discord.ext import commands

Expand Down Expand Up @@ -394,9 +394,12 @@ def message_check(
and channel.guild.me.guild_permissions.moderate_members
):
asyncio.create_task(
message.author.timeout(
timedelta(seconds=config.extensions.duck.cooldown.value),
moderation.mute_user(
user=message.author,
reason="Missed a duck",
duration=timedelta(
seconds=config.extensions.duck.cooldown.value
),
)
)

Expand Down
Loading
Loading