set permission requirements for more commands

This commit is contained in:
2024-04-14 02:46:34 +02:00
parent a1fd95cefe
commit 357355b18e
5 changed files with 151 additions and 35 deletions

View File

@@ -3,13 +3,15 @@ package main
import (
"github.com/disgoorg/disgo/discord"
"github.com/disgoorg/disgo/events"
"github.com/disgoorg/json"
"github.com/sirupsen/logrus"
)
var cmd_autopublish Command = Command{
Definition: discord.SlashCommandCreate{
Name: "autopublish",
Description: "Toggle automatically publishing every post in a announcement channel",
Name: "autopublish",
Description: "Toggle automatically publishing every post in a announcement channel",
DefaultMemberPermissions: json.NewNullablePtr(discord.PermissionManageChannels),
Contexts: []discord.InteractionContextType{
discord.InteractionContextTypeGuild,
discord.InteractionContextTypePrivateChannel},