diff --git a/redbot/core/bot.py b/redbot/core/bot.py index 9c136117a..8baf2c46b 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -1589,6 +1589,22 @@ class Red( """ if not message.author.bot: ctx = await self.get_context(message) + + # The licenseinfo command must always be available, even in a slash only bot. + # To get around not having the message content intent, a mention prefix + # will always work for it. + if not ctx.valid: + for m in (f"<@{self.user.id}> ", f"<@!{self.user.id}> "): + if message.content.startswith(m): + ctx.view.undo() + ctx.view.skip_string(m) + invoker = ctx.view.get_word() + command = self.all_commands.get(invoker, None) + if isinstance(command, commands.commands._AlwaysAvailableMixin): + ctx.command = command + ctx.prefix = m + break + if ctx.invoked_with and isinstance(message.channel, discord.PartialMessageable): log.warning( "Discarded a command message (ID: %s) with PartialMessageable channel: %r",