@evolvejs/core
Version:
An advanced Discord API wrapper with TS and JS support
66 lines (65 loc) • 3.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Endpoints = void 0;
class Endpoints {
}
exports.Endpoints = Endpoints;
/*
Constant
*/
Endpoints.GUILD = "/guilds/:id";
Endpoints.GUILD_PREVIEW = "/guilds/:id/preview";
Endpoints.GUILD_CHANNELS = "/guilds/:id/channels";
Endpoints.GUILD_MEMBERS = "/guilds/:id/members";
Endpoints.GUILD_BANS = "/guilds/:id/bans";
Endpoints.GUILD_ROLES = "/guilds/:id/roles";
Endpoints.GUILD_PRUNE = "/guilds/:id/prune";
Endpoints.GUILD_VOICE_REGIONS = "/guilds/:id/regions";
Endpoints.GUILD_INVITES = "/guilds/:id/invites";
Endpoints.GUILD_INTEGRATIONS = "/guilds/:id/integrations";
Endpoints.GUILD_WIDGET = "/guilds/:id/widget";
Endpoints.GUILD_WIDGET_JSON = "/guilds/:id/widget.json";
Endpoints.GUILD_VANITY_URL = "/guilds/:id/vanity-url";
Endpoints.GUILD_ICON = "/guild/:id/widget.png";
Endpoints.CLIENT_USER_NICK = "/guilds/:id/members/@me/nick";
Endpoints.CHANNEL = "/channels/:id";
Endpoints.CHANNEL_MESSAGES = "/channels/:id/messages";
Endpoints.CHANNEL_INVITES = "/channels/:id/invites";
Endpoints.CHANNEL_FOLLOWERS = "/channels/:id/followers";
Endpoints.TYPING = "/channels/:id/typing";
Endpoints.CHANNEL_PINS = "/channels/:id/pins";
Endpoints.BULK_DELETE = "/channels/:id/messages/bulk-delete";
Endpoints.EMOJIS = "/guilds/:id/emojis";
Endpoints.INVITE = "/invites/:id";
Endpoints.CLIENT_USER = "/users/@me";
Endpoints.CLIENT_USER_GUILDS = "/users/@me/guilds";
Endpoints.USER = "/users/:id";
Endpoints.CLIENT_USER_GUILD = "/users/@me/guilds/:id";
Endpoints.CLIENT_USER_DMS = "/users/@me/channels";
Endpoints.CLIENT_USER_CONNECTIONS = "/users/@me/connections";
Endpoints.VOICE_REGIONS = "/voice/regions";
Endpoints.WEBHOOK = "/webhooks/:id";
Endpoints.CHANNEL_WEBHOOKS = "/channels/:id/webhooks";
Endpoints.GUILD_WEBHOOKS = "/guilds/:id/webhooks";
/*
Dynamic
*/
Endpoints.GUILD_MEMBER = (guildId) => `/guilds/${guildId}/members/:id`;
Endpoints.GUILD_MEMBER_ROLE = (guildId, memberId) => `/guilds/${guildId}/members/${memberId}/roles/:id`;
Endpoints.GUILD_BAN = (guildId) => `/guilds/${guildId}/bans/:id`;
Endpoints.GUILD_ROLE = (guildId) => `/guilds/${guildId}/roles/:id`;
Endpoints.GUILD_INTEGRATION = (guildId) => `/guilds/${guildId}/integrations/:id`;
Endpoints.GUILD_INTEGRATION_SYNC = (guildId) => `/guilds/${guildId}/integrations/:id/sync`;
Endpoints.CHANNEL_MESSAGE = (channelId) => `/channels/${channelId}/messages/:id`;
Endpoints.CROSSPOST_MESSAGE = (channelId) => `/channels/${channelId}/messages/:id/crosspost`;
Endpoints.MESSAGE_REACTION = (channelId, emoji) => `/channels/${channelId}/messages/:id/reactions/${encodeURI(emoji)}/@me`;
Endpoints.USER_REACTION = (channelId, emoji, messageId) => `/channels/${channelId}/messages/${messageId}/reactions/${encodeURI(emoji)}/:id`;
Endpoints.MESSAGE_EMOJI_REACTIONS = (channelId, emoji) => `/channels/${channelId}/messages/:id/reactions/${encodeURI(emoji)}`;
Endpoints.MESSAGE_REACTIONS = (channelId) => `/channels/${channelId}/messages/:id/reactions`;
Endpoints.CHANNEL_PERMISSIONS = (channelId) => `/channels/${channelId}/permissions/:id`;
Endpoints.CHANNEL_PIN = (channelId) => `/channels/${channelId}/pins/:id`;
Endpoints.GROUP_DM_RECIPIENT = (channelId) => `/channels/${channelId}/recipients/:id`;
Endpoints.GUILD_EMOJI = (guildId) => `/guilds/${guildId}/emojis/:id`;
Endpoints.WEBHOOK_TOKEN = (webhookId) => `/webhooks/${webhookId}/:id`;
Endpoints.WEBHOOK_SLACK = (webhookId) => `/webhooks/${webhookId}/:id/slack`;
Endpoints.WEBHOOK_GITHUB = (webhookId) => `/webhooks/${webhookId}/:id/github`;