#Question regarding context menu's

1 messages · Page 1 of 1 (latest)

grizzled panther
#

I was trying to create a context menu in my bot and I expected it to be an attribute like [ContextMenu()] same as principle as [SlashCommand()].

This is what I tried:

using Discord;
using Discord.Interactions;

namespace testbot.modules.discord.bot.commands;

public class ContextTest: InteractionModuleBase<SocketInteractionContext>
{
    [ContextMenu(ApplicationCommandType.Message, "Greet User")]
    public async Task aaaa()
    {
        await RespondAsync("Meow meow and shi");
    }
}
#

I didnt see anything about this in the docs either

glass mortar
grizzled panther
#

So bro in #ai-chat-bot lied KEKW

glass mortar
#

no way the GPT hallucinated

grizzled panther
#

(I forgot i had this post open)

glass mortar
#

pfffft just 16

#

not even a 100

maiden wind
grizzled panther
#

Actually that's wrong as fuck lmao

#
using Discord;
using Discord.Interactions;

namespace modules.discord.bot.commands;

public class ContextTest: InteractionModuleBase<SocketInteractionContext>
{
    [CommandContextType(InteractionContextType.Guild)]
    [IntegrationType(Discord.ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)]
    [MessageCommand("ContextCMD")]
    public async Task ContextCMD(IMessage msg)
    {
        await RespondAsync("Meow meow and shi");
    }
}```
#

There, thats it

maiden wind
#

I was going to say I appreciate it but that is just a slash command 😂

Thank You! I will take a look when I get home from work!