diff --git a/cogs/sacrifice/sacrifice.py b/cogs/sacrifice/sacrifice.py index eef6860..f347d28 100644 --- a/cogs/sacrifice/sacrifice.py +++ b/cogs/sacrifice/sacrifice.py @@ -4,6 +4,8 @@ from redbot.core import Config, checks import discord import re +LISTENING_CHANNEL = 620879085739966464 + class SacrificeCog(commands.Cog): def __init__(self, bot): @@ -36,7 +38,7 @@ class SacrificeCog(commands.Cog): await self.log(tracked.keys()) if str(payload.message_id) in tracked.keys(): # fetch channel - channel = await self.bot.fetch_channel(620879085739966464) # channel + channel = await self.bot.fetch_channel(LISTENING_CHANNEL) # channel if not channel: tracked.remove(payload.message_id) await self.config.tracked_msgs.set(tracked) @@ -85,6 +87,8 @@ class SacrificeCog(commands.Cog): @commands.command() async def rank(self, ctx, opponent: discord.Member = None, winloss: str = None): + if ctx.channel.id != LISTENING_CHANNEL: + return author_id = str(ctx.author.id) if not opponent and not winloss: # send elo to player