question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hide commands from application list

See original GitHub issue

Hello everyone,

Is there a way how to “hide” commands from the application list when a user does not has the required permissions? I made an group “change-bot” and added RequireOwner. But the user can still see the command, but cannot execute it. Is there any way to hide it?

Here is the code (if needed)

[Group("change-bot", "Change things of the bot")]
[RequireOwner]
public class ChangeAvatarCommand : InteractionModuleBase<SocketInteractionContext>
{
    [SlashCommand("avatar", "Change avatar of the bot")]
    public async Task ChangeBotAvatarAsync()
    {
        await RespondAsync("change-bot avatar command executed.");
    }
    
    [SlashCommand("status", "Change status of the bot")]
    public async Task ChangeBotStatusAsync()
    {
        await RespondAsync("change-bot status command executed.");
    }
    
    [SlashCommand("game", "Change game of the bot")]
    public async Task ChangeBotGameAsync()
    {
        await RespondAsync("change-bot game command executed.");
    }
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

How to Hide Commands in Minecraft In The Easiest Ways ...
How to hide commands in minecraft? Go to the setting option than simpaly open the chat settings, and turn off and inactivate the...
Read more >
laravel - How to hide default artisan commands from "php ...
If you want to hide the default commands you can override them by creating a command with the same signature then add. protected...
Read more >
Is it possible to hide the command list that pops up over ...
Whenever I type a command in chat, it pops up a "commands matching YX" list over my chat. Is it possible to hide...
Read more >
How to hide commands in the prompt of Windows 10 from ...
Use the Echo command (@echo off). Share.
Read more >
How to hide the complete commandbar props in a list
Edit the list web part in the page and open the "Hide command bar" option. 226553-microsoftteams-image-5.png. If the answer is helpful, please ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found