mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Properly export constants using named exports - v8 (#871)
* Properly export constants so they can be imported using named imports which are present throughout the lib. * run grunt
This commit is contained in:
@@ -4,8 +4,10 @@ exports.__esModule = true;
|
||||
var Constants = {};
|
||||
|
||||
var API = Constants.API = "https://discordapp.com/api";
|
||||
exports.API = API;
|
||||
var CDN = Constants.CDN = "https://cdn.discordapp.com";
|
||||
|
||||
exports.CDN = CDN;
|
||||
var Endpoints = Constants.Endpoints = {
|
||||
// general endpoints
|
||||
LOGIN: API + "/auth/login",
|
||||
@@ -117,7 +119,8 @@ var Endpoints = Constants.Endpoints = {
|
||||
FRIENDS: API + "/users/@me/relationships"
|
||||
};
|
||||
|
||||
Constants.Permissions = {
|
||||
exports.Endpoints = Endpoints;
|
||||
var Permissions = Constants.Permissions = {
|
||||
// general
|
||||
createInstantInvite: 1 << 0,
|
||||
kickMembers: 1 << 1,
|
||||
@@ -149,7 +152,8 @@ Constants.Permissions = {
|
||||
|
||||
};
|
||||
|
||||
Constants.PacketType = {
|
||||
exports.Permissions = Permissions;
|
||||
var PacketType = Constants.PacketType = {
|
||||
CHANNEL_CREATE: "CHANNEL_CREATE",
|
||||
CHANNEL_DELETE: "CHANNEL_DELETE",
|
||||
CHANNEL_UPDATE: "CHANNEL_UPDATE",
|
||||
@@ -181,5 +185,5 @@ Constants.PacketType = {
|
||||
FRIEND_REMOVE: "RELATIONSHIP_REMOVE"
|
||||
};
|
||||
|
||||
exports.PacketType = PacketType;
|
||||
exports["default"] = Constants;
|
||||
module.exports = exports["default"];
|
||||
|
||||
Reference in New Issue
Block a user