diff --git a/lib/Constants.js b/lib/Constants.js index 045d71389..5671b0313 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -255,7 +255,6 @@ module.exports.UserFlags = { VERIFIED_BOT_DEVELOPER: 1 << 17 }; - module.exports.Intents = { guilds: 1 << 0, guildMembers: 1 << 1, @@ -273,3 +272,20 @@ module.exports.Intents = { directMessageReactions: 1 << 13, directMessageTyping: 1 << 14 }; + +module.exports.CommandOptionTypes = { + SUB_COMMAND: 1, + SUB_COMMAND_GROUP: 2, + STRING: 3, + INTEGER: 4, + BOOLEAN: 5, + USER: 6, + CHANNEL: 7, + ROLE: 8, + MENTIONABLE: 9 +}; + +module.exports.CommandPermissionTypes = { + ROLE: 1, + USER: 2 +}; diff --git a/lib/rest/Endpoints.js b/lib/rest/Endpoints.js index 050444281..f32d3241e 100644 --- a/lib/rest/Endpoints.js +++ b/lib/rest/Endpoints.js @@ -6,6 +6,8 @@ module.exports.BASE_URL = "/api/v" + REST_VERSION; module.exports.CDN_URL = "https://cdn.discordapp.com"; module.exports.CLIENT_URL = "https://discord.com"; +module.exports.COMMAND = (applicationId, commandId) => `/applications/${applicationId}/commands/${commandId}`; +module.exports.COMMANDS = (applicationId) => `/applications/${applicationId}/commands`; module.exports.CHANNEL = (chanID) => `/channels/${chanID}`; module.exports.CHANNEL_BULK_DELETE = (chanID) => `/channels/${chanID}/messages/bulk-delete`; module.exports.CHANNEL_CALL_RING = (chanID) => `/channels/${chanID}/call/ring`; @@ -36,6 +38,8 @@ module.exports.GUILD_AUDIT_LOGS = (guildID) module.exports.GUILD_BAN = (guildID, memberID) => `/guilds/${guildID}/bans/${memberID}`; module.exports.GUILD_BANS = (guildID) => `/guilds/${guildID}/bans`; module.exports.GUILD_CHANNELS = (guildID) => `/guilds/${guildID}/channels`; +module.exports.GUILD_COMMAND = (applicationId, guildId, commandId) => `/applications/${applicationId}/guilds/${guildId}/commands/${commandId}`; +module.exports.GUILD_COMMANDS = (applicationId, guildId) => `/applications/${applicationId}/guilds/${guildId}/commands`; module.exports.GUILD_DISCOVERY = (guildID) => `/guilds/${guildID}/discovery-metadata`; module.exports.GUILD_DISCOVERY_CATEGORY = (guildID, categoryID) => `/guilds/${guildID}/discovery-categories/${categoryID}`; module.exports.GUILD_EMBED = (guildID) => `/guilds/${guildID}/embed`;