Compare commits

..
25 Commits
Author SHA1 Message Date
imcompiling 5412ab14a3 Feat: Update uv.lock.
build_develop / build (push) Successful in 45s
2025-07-17 09:14:51 -04:00
imcompiling 16cdc27bdb Feat: Update utils to use new models.
Address many pylance smells. Ignoring some I don't know how to handle,
added some TODOs for handling others later.
2025-07-17 09:14:51 -04:00
imcompiling 086f8b50cd Fix: Add default of None to speech ids. 2025-07-17 09:14:51 -04:00
imcompiling a6a73cb46e Feat: Rename DakinySettings -> dakiny_settings.
Also handle the list error from pylance.
2025-07-17 09:14:51 -04:00
imcompiling 57e19f3036 Feat: Remove pylance warnings in app.py.
Also removed old database setup.
2025-07-17 09:14:51 -04:00
imcompiling 51c8483dad Remove: Old database files. 2025-07-17 09:14:51 -04:00
imcompiling 6b60c37726 Fix: errors on models from generating database. 2025-07-17 09:14:51 -04:00
imcompiling 3eea225931 Feat: Add database engine. 2025-07-17 09:14:51 -04:00
imcompiling 0529dc6b4c Add: ondelete to spelling settings. 2025-07-17 09:14:51 -04:00
imcompiling 865fee4ce2 Add: PointsLimit model. 2025-07-17 09:14:51 -04:00
imcompiling 052202d273 Fix: Add default to points. 2025-07-17 09:14:51 -04:00
imcompiling c09dd94284 Add: Messages model. 2025-07-17 09:14:51 -04:00
imcompiling 76f4a9f37f Add: Points model. 2025-07-17 09:14:51 -04:00
imcompiling f446f8e9cc Fix: Add boolean column types. 2025-07-17 09:14:51 -04:00
imcompiling dbd1d6dc00 Add: Presence model. 2025-07-17 09:14:51 -04:00
imcompiling 66621ea2a0 Add: UserBirthday model. 2025-07-17 09:14:51 -04:00
imcompiling 6ae56bf8b2 Add: Vote model. 2025-07-17 09:14:51 -04:00
imcompiling f472c0419b Add: CouncilMembers model. 2025-07-17 09:14:51 -04:00
imcompiling a7532773c1 Feat: Add ElectionInformation table. 2025-07-17 09:14:51 -04:00
imcompiling 81ad4ba313 Feat: Install sqlmodel. 2025-07-17 09:14:51 -04:00
imcompiling b221f1e438 Feat: Update the ban message.
build_develop / build (push) Successful in 37s
build_latest / build (push) Successful in 21s
build_release / build (push) Successful in 22s
For some reason, the user's name was None. I'm guessing because they were
banned and are no longer a member or something. Don't need to record the member's
name anyway though, as its already a part of the audit log.
2025-07-16 21:24:03 -04:00
imcompiling 1b08ba1355 Feat: Set delete messages to 30 minutes.
build_develop / build (push) Successful in 32s
2025-07-16 16:03:26 -04:00
imcompiling e191df1a38 Fix: spelling and ignore pylance warning.
build_develop / build (push) Successful in 32s
2025-07-16 15:57:31 -04:00
imcompiling e35a2a8c8d Feat: Add autoban
build_develop / build (push) Successful in 38s
2025-07-16 15:55:09 -04:00
imcompiling d7046e4595 Add: config for ban channel id. 2025-07-16 15:45:35 -04:00
2 changed files with 12 additions and 2 deletions
+11 -2
View File
@@ -4,6 +4,7 @@ import nextcord
from nextcord.ext import commands from nextcord.ext import commands
from dakiny_bot.app import birthday_list from dakiny_bot.app import birthday_list
from dakiny_bot.DakinySettings import settings
class SubmissionListener(commands.Cog, name="Message Listener"): class SubmissionListener(commands.Cog, name="Message Listener"):
@@ -16,7 +17,15 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
async def on_message(self, message: nextcord.Message) -> None: async def on_message(self, message: nextcord.Message) -> None:
"""Listener for message creation. Adds score and attachments to submission.""" """Listener for message creation. Adds score and attachments to submission."""
# don't want to process any messages from bot. # don't want to process any messages from bot.
if message.author.id == self.bot.user.id: if message.author.id == self.bot.user.id: # pyright: ignore[reportOptionalMemberAccess]
return
# Ban all members who message in this channel. Everyone in guild is a member, so shouldn't miss a ban
# due to message.author not being a nextcord.Member object.
if message.channel.id == settings.channel_ids.ban and isinstance(message.author, nextcord.Member):
await message.author.ban(
delete_message_seconds=30 * 60, reason="Probable spam. The ban channel was messaged."
)
return return
await birthday_action(message) await birthday_action(message)
@@ -31,7 +40,7 @@ def setup(bot: commands.Bot) -> None:
async def birthday_action(message: nextcord.Message) -> None: async def birthday_action(message: nextcord.Message) -> None:
""" """
Checks a message's auther and mentions to see if they are in the birthday list. Checks a message's author and mentions to see if they are in the birthday list.
Args: Args:
message (nextcord.Message): The message to check for a birthday person. message (nextcord.Message): The message to check for a birthday person.
+1
View File
@@ -17,6 +17,7 @@ class ChannelIds:
event_post: int event_post: int
general: int general: int
voting: int voting: int
ban: int
@dataclass @dataclass