Skip to content

Commit

Permalink
edited in wrong branch whoops
Browse files Browse the repository at this point in the history
  • Loading branch information
aaj2005 committed Nov 7, 2024
1 parent 8fd78d9 commit 9576dfc
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions cogs/commands/onmessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
from discord.ext import commands
from discord.ext.commands import Bot, Cog

from config import CONFIG
from karma.karma import process_karma
from models import db_session


class OnMessage(commands.Cog):
def __init__(self, bot: Bot):
self.bot = bot
Expand Down Expand Up @@ -64,21 +59,6 @@ async def thanks(self, message: Message):
):
return

# get all command prefixes
command_prefixes = self.bot.command_prefix(self.bot, message)
# if message is not command, check for karma
if not any(message.content.startswith(prefix) for prefix in command_prefixes):
# process karma if apropriate
if search(r"\+\+|--|\+\-", message.content):
reply = process_karma(
message, message.id, db_session, CONFIG.KARMA_TIMEOUT
)
# if message is a valid karma
if reply:
return
else:
# message is command, so don't run
return
return await message.add_reaction("💜")

async def scan_replace(self, message: Message, regex, replace):
Expand Down

0 comments on commit 9576dfc

Please sign in to comment.