Skip to content

Commit

Permalink
feat: set command permission
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisaAkiron committed Jan 10, 2025
1 parent 1d9036c commit a3aa530
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using Discord.Interactions;
using Discord;
using Discord.Interactions;

namespace PallasBot.Application.Command.SlashCommands;

public class CommonCommands : InteractionModuleBase
{
[RequireUserPermission(GuildPermission.Administrator)]
[SlashCommand("ping", "Test the responsiveness of the bot")]
public async Task PingAsync()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Discord;
using Discord.Interactions;
using MassTransit;
using PallasBot.Application.Common.Models;
using PallasBot.Application.Common.Models.Messages;
using PallasBot.Domain.Abstract;
using PallasBot.Domain.Enums;
Expand All @@ -11,6 +10,7 @@ namespace PallasBot.Application.Command.SlashCommands;
[Group("config", "Configuration commands")]
public class ConfigurationCommands : InteractionModuleBase
{
[RequireUserPermission(GuildPermission.Administrator)]
[Group("set", "Set configurations")]
public class ConfigurationSetPrefixCommands : InteractionModuleBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public LoginCommands(
_publishEndpoint = publishEndpoint;
}

[RequireUserPermission(GuildPermission.ViewChannel)]
[SlashCommand("github", "Login and bind your GitHub account")]
public async Task LoginWithGitHubAsync()
{
Expand Down

0 comments on commit a3aa530

Please sign in to comment.