3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

Add typings, comment magic numbers

This commit is contained in:
Dark 2021-08-15 22:14:04 +02:00
parent 99c8dbabb7
commit 9a5e911cf2
No known key found for this signature in database
GPG key ID: 384C4B4F5B1E25A8
5 changed files with 18 additions and 5 deletions

View file

@ -14,7 +14,7 @@ export async function loadAllCommands(pluginData: GuildPluginData<ContextMenuPlu
for (const [name, label] of Object.entries(hardcodedContext)) {
if (!cfg[name]) continue;
const type = name.startsWith("user") ? 2 : 3;
const type = name.startsWith("user") ? 2 : 3; // 2 = User, 3 = Message (https://discord.com/developers/docs/interactions/application-commands#user-commands)
const data: ApplicationCommandData = {
type,
name: label,