#Application command not appearing in context menu

1 messages · Page 1 of 1 (latest)

pulsar crater
#

I'm using the commands submodule and in a particular cog I've got 8 slash commands all working perfectly, but when I added a message_command, it doesn't appear in the context menu.

@commands.cooldown(1, 60)
@commands.message_command(name="Report confession", dm_permission=False)
async def report(self, inter:disnake.MessageCommandInteraction):
  """ Reports a confession to the bot owners """
  if inter.target.author != self.bot.user or inter.target.embeds.count == 0:
    inter.response.send_message(self.bot.babel(inter, 'confessions', 'report_invalid_message'))
    return
  inter.response.send_modal(self.ReportModal(self, inter.target, inter))

I spotted somebody else had a similar issue 30 days ago, however they didn't share their solution.

humble ermine
#

nvm apparently that's optional

#

in that case, try enabling command sync debug:

sync_flags = commands.CommandSyncFlags.default()
sync_flags.sync_commands_debug = True

...

bot = commands.Bot(..., command_sync_flags=sync_flags)
#

it might give some clarity

pulsar crater
#

Alright, giving that a try now

#

There was no errors there, I think the issue was my client not noticing the command was added. Restarting my client seems to have fixed it.

#

Thanks for the help anyway, this debug flag is invaluable

humble ermine
#

yeah, if sync debug shows that everything's been upserted just fine, it's 9/10 times a client issue so just ctrl+R should fix it

humble ermine