discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

Slash commands missing features

Open Skye-31 opened this issue 3 years ago • 2 comments

In #856 slash commands were implemented. From what I've noticed, these are missing two features.

The first is global slash commands working in DMs (documented here). With the current behaviour, using a slash command in DMs will result in a Runtime error as the Guild ID and member objects are null, instead using a user object.

The second is that there is no method to bulk update slash commands. While this technically hasn't been documented, it was announced in the discord developers server here and is considered stable. This method is necessary for updating several commands at once, including creating, editing and deleting with 1 API request, instead of the several that would otherwise be used. image

These should both be relatively easy to change.

Skye-31 avatar Mar 04 '21 16:03 Skye-31

The permissions field also appears to be missing from the interaction object. See the links below.

https://discord.com/developers/docs/resources/guild#guild-member-object https://discord.com/developers/docs/interactions/slash-commands#receiving-an-interaction https://github.com/bwmarrin/discordgo/blob/182d9b48f34b19f51cc5a88868a5477e52c02776/interactions.go#L70 https://github.com/bwmarrin/discordgo/blob/182d9b48f34b19f51cc5a88868a5477e52c02776/structs.go#L767

Fragonite avatar Mar 25 '21 07:03 Fragonite

I opened a pr for bulk overwriting/updating https://github.com/bwmarrin/discordgo/pull/926

the permissions field has already been implemented

plally avatar May 08 '21 00:05 plally