Hey, Im trying run one bot, Im getting this error:
Ignoring exception in slash command 'channel': Traceback (most recent call last): File "/home/jst/BakaBot/env/lib/python3.12/site-packages/disnake/ext/commands/interaction_bot_base.py", line 1378, in process_application_commands await app_command.invoke(interaction) File "/home/jst/BakaBot/env/lib/python3.12/site-packages/disnake/ext/commands/slash_core.py", line 717, in invoke await self.prepare(inter) File "/home/jst/BakaBot/env/lib/python3.12/site-packages/disnake/ext/commands/base_core.py", line 315, in prepare raise CheckFailure(f"The check functions for command {self.qualified_name!r} failed.") disnake.ext.commands.errors.CheckFailure: The check functions for command 'channel' failed.
My code for that command that makes error:
`
channels = ["Grades", "Schedule", "Reminder", "Status"]
async def channelSchedule(self, inter: disnake.ApplicationCommandInteraction, function: str):
write_db(f"channel{function}", inter.channel_id)
await inter.response.send_message(f"channel_{function.lower()} changed to this channel", ephemeral=True)
slashChannelSchedule = commands.InvokableSlashCommand(
channelSchedule,
name="channel",
description="Use this command in the channel where you want to have the bot's functions to send messages",
checks=[admin_user_check],
group=group,
options=[
disnake.Option(
name="function",
description="Select the function for this channel",
choices=[disnake.OptionChoice(name=channel, value=channel) for channel in channels],
type=disnake.OptionType.string,
required=True,
),
],
)
`
The Bot has admin permission.