added partial userinstall support

This commit is contained in:
2024-04-10 18:15:08 +02:00
parent 99617e5e1f
commit bb9c616844
11 changed files with 120 additions and 70 deletions

View File

@@ -13,6 +13,11 @@ var cmd_sticky Command = Command{
Name: "sticky",
Description: "Stick or unstick messages to the bottom of the current channel",
DefaultMemberPermissions: json.NewNullablePtr(discord.PermissionManageMessages),
Contexts: []discord.InteractionContextType{
discord.InteractionContextTypeGuild,
discord.InteractionContextTypePrivateChannel},
IntegrationTypes: []discord.ApplicationIntegrationType{
discord.ApplicationIntegrationTypeGuildInstall},
Options: []discord.ApplicationCommandOption{
&discord.ApplicationCommandOptionString{
Name: "message",
@@ -53,6 +58,11 @@ var context_sticky Command = Command{
Definition: discord.MessageCommandCreate{
Name: "Stick to channel",
DefaultMemberPermissions: json.NewNullablePtr(discord.PermissionManageMessages),
Contexts: []discord.InteractionContextType{
discord.InteractionContextTypeGuild,
discord.InteractionContextTypePrivateChannel},
IntegrationTypes: []discord.ApplicationIntegrationType{
discord.ApplicationIntegrationTypeGuildInstall},
},
Interact: func(e *events.ApplicationCommandInteractionCreate) {
inputStickyMessage(e)