Page MenuHomeAITSYS Dev

[ApplicationCommands] Option to easily set permissions on global commands
Closed, InvalidPublic


I want an option to easily set the permissions on global commands.
The actual way is not acceptable.My idea is the following method:

public Task RegisterApplicationCommands(ApplicationCommandsExtension app_com) {
  app_com.RegisterGuildCommand<Bot.SupportGuildCommands>(858089281214087179, perms => {
      perms.AddRole(858094712375607296, true);
      perms.AddUser(366267899251392513, false);

  app_com.RegisterGlobalCommand<Bot.Commands>(perms => {
    perms.AddGuild(858089281214087179, guild_perms => {
      guild_perms.AddRole(858094712375607296, true);
      guild_perms.AddUser(366267899251392513, false);

Event Timeline

Nyuw triaged this task as Wishlist priority.Sun, Sep 26, 02:05
Nyuw created this task.
Nyuw created this object with edit policy "DisCatSharp (Project)".
Nyuw added projects: DisCatSharp, Restricted Project, Restricted Project.
Nyuw edited subscribers, added: DisCatSharp, DisCatSharp Contributor, Restricted Project; removed: Nyuw.
aiko updated the task description. (Show Details)
aiko updated the task description. (Show Details)