Skip to content

Commit

Permalink
Added endpoints, Added consistents
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCat80 committed Jul 3, 2021
1 parent 34f3d9c commit 6445515
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lib/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ module.exports.UserFlags = {
VERIFIED_BOT_DEVELOPER: 1 << 17
};


module.exports.Intents = {
guilds: 1 << 0,
guildMembers: 1 << 1,
Expand All @@ -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
};
4 changes: 4 additions & 0 deletions lib/rest/Endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
Expand Down Expand Up @@ -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`;
Expand Down

0 comments on commit 6445515

Please sign in to comment.