Pushing changes

This commit is contained in:
2017-03-23 23:52:08 -05:00
parent 6075860b82
commit ac667ec74f
1465 changed files with 345149 additions and 3 deletions

44
node_modules/discordie/lib/models/AuthenticatedUser.js generated vendored Normal file
View File

@ -0,0 +1,44 @@
"use strict";
const Constants = require("../Constants");
const StatusTypes = Constants.StatusTypes;
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias AuthenticatedUser
*/
const BaseAuthenticatedUser = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
username: "",
/** @returns {String|null} */
discriminator: null,
/** @returns {String|null} */
email: null,
/** @returns {boolean|null} */
verified: false,
/** @returns {String|null} */
status: StatusTypes.ONLINE,
/** @returns {String|null} */
avatar: null,
/** @returns {String|null} */
token: null,
/** @returns {boolean|null} */
bot: false,
/** @returns {boolean|null} */
mfa_enabled: false,
/** @returns {Object|null} */
game: null, // clientside cache
/** @returns {boolean|null} */
afk: false // clientside cache
};
class AuthenticatedUser extends BaseModel {
constructor(def) {
super(BaseAuthenticatedUser, def);
}
}
module.exports = AuthenticatedUser;

27
node_modules/discordie/lib/models/BaseModel.js generated vendored Normal file
View File

@ -0,0 +1,27 @@
"use strict";
class BaseModel {
constructor(base, def) {
for (let k in base) {
this[k] = ((def && def.hasOwnProperty(k)) ? def[k] : base[k]);
}
Object.freeze(this);
}
merge(def) {
if (!def) {
return this;
}
let merged = {};
for (let k in this) {
merged[k] = this[k];
}
for (let k in def) {
if (merged.hasOwnProperty(k)) {
merged[k] = def[k];
}
}
return new this.constructor(merged);
}
}
module.exports = BaseModel;

29
node_modules/discordie/lib/models/Call.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias Call
*/
const BaseCall = {
/** @returns {String|null} */
channel_id: null,
/** @returns {String|null} */
message_id: null,
/** @returns {String|null} */
region: null,
/** @returns {Array<String>|null} */
ringing: [],
/** @returns {boolean|null} */
unavailable: false
};
class Call extends BaseModel {
constructor(def) {
super(BaseCall, def);
}
}
module.exports = Call;

44
node_modules/discordie/lib/models/Channel.js generated vendored Normal file
View File

@ -0,0 +1,44 @@
"use strict";
const Constants = require("../Constants");
const ChannelTypes = Constants.ChannelTypes;
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias Channel
*/
const BaseChannel = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
name: "<not initialized>",
/** @returns {String|null} */
topic: "",
/** @returns {Number|null} */
position: 0,
/** @returns {Number|null} */
type: ChannelTypes.GUILD_TEXT,
/** @returns {String|null} */
guild_id: null,
/** @returns {Set|null} */
recipients: new Set(),
/** @returns {Array|null} */
permission_overwrites: [],
/** @returns {Number|null} */
bitrate: 0,
/** @returns {Number|null} */
user_limit: 0,
/** @returns {String|null} */
owner_id: null,
/** @returns {String|null} */
icon: null
};
class Channel extends BaseModel {
constructor(def) {
super(BaseChannel, def);
}
}
module.exports = Channel;

53
node_modules/discordie/lib/models/Guild.js generated vendored Normal file
View File

@ -0,0 +1,53 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias Guild
*/
const BaseGuild = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
name: null,
/** @returns {String|null} */
owner_id: null,
/** @returns {String|null} */
icon: null,
/** @returns {String|null} */
splash: null,
/** @returns {Set|null} */
features: new Set(),
/** @returns {Array<Object>|null} */
emojis: [],
/** @returns {Number|null} */
default_message_notifications: 0,
/** @returns {Map|null} */
roles: new Map(),
/** @returns {String|null} */
afk_channel_id: null,
/** @returns {Number|null} */
afk_timeout: null,
/** @returns {Number|null} */
verification_level: 0,
/** @returns {String|null} */
region: null,
/** @returns {Number|null} */
member_count: 0,
/** @returns {Boolean|null} */
large: false,
/** @returns {Number|null} */
mfa_level: 0,
/** @returns {String|null} */
joined_at: ""
};
class Guild extends BaseModel {
constructor(def) {
super(BaseGuild, def);
}
}
module.exports = Guild;

37
node_modules/discordie/lib/models/GuildMember.js generated vendored Normal file
View File

@ -0,0 +1,37 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias GuildMember
*/
const BaseGuildMember = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
guild_id: null,
/** @returns {String|null} */
nick: null,
/** @returns {Array|null} */
roles: [],
/** @returns {boolean|null} */
mute: false,
/** @returns {boolean|null} */
deaf: false,
/** @returns {boolean|null} */
self_mute: false,
/** @returns {boolean|null} */
self_deaf: false,
/** @returns {String|null} */
joined_at: ""
};
class GuildMember extends BaseModel {
constructor(def) {
super(BaseGuildMember, def);
}
}
module.exports = GuildMember;

75
node_modules/discordie/lib/models/Message.js generated vendored Normal file
View File

@ -0,0 +1,75 @@
"use strict";
const Constants = require("../Constants");
const MessageTypes = Constants.MessageTypes;
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias Message
*/
const BaseMessage = {
/** @returns {String|null} */
id: null,
/** @returns {Number|null} */
type: MessageTypes.DEFAULT,
/** @returns {String|null} */
channel_id: null,
/** @returns {User|null} */
author: null,
/** @returns {String|null} */
content: "",
/** @returns {Array|null} */
attachments: [],
/** @returns {Array|null} */
embeds: [],
/** @returns {Array|null} */
mentions: [],
/** @returns {Array|null} */
mention_roles: [],
/** @returns {boolean|null} */
mention_everyone: false,
/** @returns {boolean|null} */
tts: false,
/** @returns {String|null} */
timestamp: "",
/** @returns {String|null} */
edited_timestamp: null,
/** @returns {String|null} */
nonce: null,
/** @returns {String|null} */
webhook_id: null,
/** @returns {Array|null} */
reactions: [],
/** @returns {boolean|null} */
pinned: false,
/**
* Raw MessageCall object:
*
* ```js
* {
* // Array of user ids participating in this call,
* // only used to check if the call was missed
* participants: [ "108721394061205504" ], // Array<String>
*
* // Timestamp when call ended, null if call is in progress
* ended_timestamp: "2016-07-24T06:52:11.860000+00:00" // String | null
* }
* ```
* @returns {Object|null}
* @memberOf IMessage
* @readonly
* */
call: null,
/** @returns {boolean|null} */
deleted: false // for clientside cache
};
class Message extends BaseModel {
constructor(def) {
super(BaseMessage, def);
}
}
module.exports = Message;

View File

@ -0,0 +1,27 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias PermissionOverwrite
*/
const BasePermissionOverwrite = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
type: null,
/** @returns {Number|null} */
allow: 0,
/** @returns {Number|null} */
deny: 0
};
class PermissionOverwrite extends BaseModel {
constructor(def) {
super(BasePermissionOverwrite, def);
}
}
module.exports = PermissionOverwrite;

35
node_modules/discordie/lib/models/Role.js generated vendored Normal file
View File

@ -0,0 +1,35 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias Role
*/
const BaseRole = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
name: null,
/** @returns {Number|null} */
permissions: 0,
/** @returns {boolean|null} */
mentionable: false,
/** @returns {Number|null} */
position: -1,
/** @returns {boolean|null} */
hoist: false,
/** @returns {Number|null} */
color: 0,
/** @returns {boolean|null} */
managed: false
};
class Role extends BaseModel {
constructor(def) {
super(BaseRole, def);
}
}
module.exports = Role;

29
node_modules/discordie/lib/models/User.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
"use strict";
const Constants = require("../Constants");
const BaseModel = require("./BaseModel");
/**
* @kind model
* @alias User
*/
const BaseUser = {
/** @returns {String|null} */
id: null,
/** @returns {String|null} */
username: "",
/** @returns {String|null} */
discriminator: null,
/** @returns {String|null} */
avatar: null,
/** @returns {boolean|null} */
bot: false,
};
class User extends BaseModel {
constructor(def) {
super(BaseUser, def);
}
}
module.exports = User;