diff --git a/jarvis/cogs/autoreact.py b/jarvis/cogs/autoreact.py index 6e6ad6c..1e1f431 100644 --- a/jarvis/cogs/autoreact.py +++ b/jarvis/cogs/autoreact.py @@ -4,7 +4,7 @@ from datetime import datetime from discord import TextChannel from discord.ext import commands from discord.utils import find -from discord_slash import cog_ext +from discord_slash import SlashContext, cog_ext from discord_slash.utils.manage_commands import create_option import jarvis @@ -35,7 +35,10 @@ class AutoReactCog(commands.Cog): ], ) @commands.has_permissions(administrator=True) - async def _autoreact_create(self, ctx, channel: TextChannel): + async def _autoreact_create(self, ctx: SlashContext, channel: TextChannel): + if not isinstance(channel, TextChannel): + await ctx.send("Channel must be a text channel", hidden=True) + return exists = self.db.jarvis.autoreact.find_one( {"guild": ctx.guild.id, "channel": channel.id} )