Skip to content

Commit

Permalink
feat: Remove cooldown check from auto_react_reports cog (#50)
Browse files Browse the repository at this point in the history
as an adjustable cooldown is not necessary in this case
  • Loading branch information
GeckoEidechse authored Aug 27, 2024
1 parent f40d932 commit 199813f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions reaper/cogs/auto_react_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import datetime
import discord
from discord.ext import commands
from cogs.global_replies import allow_replies
from util import globals


Expand All @@ -21,20 +20,6 @@ def __init__(self, bot: commands.Bot) -> None:

@commands.Cog.listener()
async def on_message(self, message):
time_diff = (
datetime.datetime.now(datetime.timezone.utc) - self.last_time
).total_seconds()

if not (
time_diff > globals.config["general"]["cooldowntime"]
or message.channel.id != self.last_channel
):
self.last_channel = message.channel.id
logger.warn("Tried to send message while on cooldown! Didn't send message!")
return

if not allow_replies():
return

if message.channel.id == globals.config["channels"]["report-users-channel-id"]:
# This is to check if the message is a "Person started a thread" message
Expand Down

0 comments on commit 199813f

Please sign in to comment.