Socket
Socket
Sign inDemoInstall

eris

Package Overview
Dependencies
6
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.4 to 0.8.5

1

index.d.ts

@@ -416,3 +416,2 @@ declare module "eris" {

seedVoiceConnections?: boolean;
sequencerWaiter?: number;
defaultImageFormat?: string;

@@ -419,0 +418,0 @@ defaultImageSize?: number;

1

index.js

@@ -36,2 +36,3 @@ "use strict";

Eris.User = require("./lib/structures/User");
Eris.VERSION = require('./package.json').version;
Eris.VoiceChannel = require("./lib/structures/VoiceChannel");

@@ -38,0 +39,0 @@ Eris.VoiceConnection = require("./lib/voice/VoiceConnection");

@@ -17,10 +17,19 @@ "use strict";

* @arg {Array<String>} [options.aliases] An array of command aliases
* @arg {Boolean} [options.argsRequired=false] If arguments are required or not
* @arg {Boolean} [options.caseInsensitive=false] Whether the command label (and aliases) is case insensitive or not
* @arg {Number} [options.cooldown] The cooldown between command usage in milliseconds
* @arg {Object} [options.cooldownExclusions={}] A set of factors that limit where cooldowns are active
* @arg {Array<String>} [options.cooldownExclusions.userIDs] An array of user IDs representing users that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.guildIDs] An array of guild IDs representing guilds that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.channelIDs] An array of channel IDs representing channels that are not affected by cooldowns.
* @arg {Function | String} [options.cooldownMessage] A string or a function that returns a string to show when the command is on cooldown. The function is passed the Message object as a parameter.
* @arg {Number} [option.cooldownReturns=0] Number of times to return a message when the command is used during it's cooldown. Once the cooldown expires this is reset. Set this to 0 to always return a message.
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.deleteCommand=false] Whether to delete the user command message or not
* @arg {Boolean} [options.argsRequired=false] If arguments are required or not
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the command from being used in Direct Messages or not
* @arg {String} [options.description="No description"] A short description of the command to show in the default help command
* @arg {Boolean} [options.dmOnly=false] Whether to prevent the command from being used in guilds or not
* @arg {String} [options.description="No description"] A short description of the command to show in the default help command
* @arg {Function | String} [options.errorMessage] A string or a function that returns a string to show if the execution of the command handler somehow fails. The function is passed the Message object as a parameter.
* @arg {String} [options.fullDescription="No full description"] A detailed description of the command to show in the default help command
* @arg {String} [options.usage] Details on how to call the command to show in the default help command
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the command from being used in Direct Messages or not
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list.
* @arg {Object} [options.hooks] A set of functions to be executed at different times throughout the command's processing

@@ -31,2 +40,9 @@ * @arg {Function} [options.hooks.preCommand] A function that is executed before any permission or cooldown checks is made. The function is passed the command message and arguments as parameters.

* @arg {Function} [options.hooks.postCommand] A function that is executed after a response has been posted, and the command has finished processing. The function is passed the command message, arguments, and the response message (if applicable) as parameters.
* @arg {Function | String} [options.invalidUsageMessage] A string or a function that returns a string to show when a command was improperly used. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.permissionMessage] A string or a function that returns a string to show when the user doesn't have permissions to use the command. The function is passed the Message object as a parameter.
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function, but with an extra userID parameter for generator functions (`function(msg, args, userID)`) describing the user that made the reaction
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.requirements] A set of factors that limit who can call the command

@@ -46,20 +62,4 @@ * @arg {Function | Array<String>} [options.requirements.userIDs] An array or a function that returns an array of user IDs representing users that can call the command. The function is passed the Message object as a parameter.

* @arg {Function} [options.requirements.custom] A function that accepts a message and returns true if the command should be run
* @arg {Number} [options.cooldown] The cooldown between command usage in milliseconds
* @arg {Object} [options.cooldownExclusions={}] A set of factors that limit where cooldowns are active
* @arg {Array<String>} [options.cooldownExclusions.userIDs] An array of user IDs representing users that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.guildIDs] An array of guild IDs representing guilds that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.channelIDs] An array of channel IDs representing channels that are not affected by cooldowns.
* @arg {Boolean} [option.restartCooldown=false] Whether or not to restart a command's cooldown every time it's used.
* @arg {Number} [option.cooldownReturns=0] Number of times to return a message when the command is used during it's cooldown. Once the cooldown expires this is reset. Set this to 0 to always return a message.
* @arg {Function | String} [options.cooldownMessage] A string or a function that returns a string to show when the command is on cooldown. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.invalidUsageMessage] A string or a function that returns a string to show when a command was improperly used. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.permissionMessage] A string or a function that returns a string to show when the user doesn't have permissions to use the command. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.errorMessage] A string or a function that returns a string to show if the execution of the command handler somehow fails. The function is passed the Message object as a parameter.
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list.
* @arg {String} [options.usage] Details on how to call the command to show in the default help command
*/

@@ -237,6 +237,12 @@ constructor(label, generator, options, parentCommand) {

cooldownExclusionCheck(msg) {
if(this.cooldownExclusions.channelIDs.indexOf(msg.channel.id) > -1) return true;
if(this.cooldownExclusions.userIDs.indexOf(msg.author.id) > -1) return true;
if(msg.channel.guild && this.cooldownExclusions.guildIDs.indexOf(msg.channel.guild.id) > -1) return true;
if(this.cooldownExclusions.channelIDs.indexOf(msg.channel.id) > -1) {
return true;
}
if(this.cooldownExclusions.userIDs.indexOf(msg.author.id) > -1) {
return true;
}
if(msg.channel.guild && this.cooldownExclusions.guildIDs.indexOf(msg.channel.guild.id) > -1) {
return true;
}
return false;

@@ -247,3 +253,5 @@ }

// Verify the msg isn't excluded from cooldown checks
if(this.cooldownExclusionCheck(msg)) return true;
if(this.cooldownExclusionCheck(msg)) {
return true;
}

@@ -391,14 +399,35 @@ var userID = msg.author.id;

* @arg {Object} [options] Command options
* @arg {Array<String>} [options.aliases] An array of subcommand aliases
* @arg {Boolean} [options.caseInsensitive=false] Whether the subcommand label (and aliases) is case insensitive or not
* @arg {Boolean} [options.deleteCommand=false] Whether to delete the user subcommand message or not
* @arg {Array<String>} [options.aliases] An array of command aliases
* @arg {Boolean} [options.argsRequired=false] If arguments are required or not
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the subcommand from being used in Direct Messages or not
* @arg {Boolean} [options.dmOnly=false] Whether to prevent the subcommand from being used in guilds or not
* @arg {String} [options.description="No description"] A short description of the subcommand to show in the default help subcommand
* @arg {String} [options.fullDescription="No full description"] A detailed description of the subcommand to show in the default help subcommand
* @arg {String} [options.usage] Details on how to call the subcommand to show in the default help subcommand
* @arg {Object} [options.requirements] A set of factors that limit who can call the subcommand
* @arg {Function | Array<String>} [options.requirements.userIDs] An array or a function that returns an array of user IDs representing users that can call the subcommand
* @arg {Function | Object} [options.requirements.permissions] An object or a function that returns an object containing permission keys the user must match to use the subcommand
* @arg {Boolean} [options.caseInsensitive=false] Whether the command label (and aliases) is case insensitive or not
* @arg {Number} [options.cooldown] The cooldown between command usage in milliseconds
* @arg {Object} [options.cooldownExclusions={}] A set of factors that limit where cooldowns are active
* @arg {Array<String>} [options.cooldownExclusions.userIDs] An array of user IDs representing users that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.guildIDs] An array of guild IDs representing guilds that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.channelIDs] An array of channel IDs representing channels that are not affected by cooldowns.
* @arg {Function | String} [options.cooldownMessage] A string or a function that returns a string to show when the command is on cooldown
* @arg {Number} [option.cooldownReturns=0] Number of times to return a message when the command is used during it's cooldown. Once the cooldown expires this is reset. Set this to 0 to always return a message.
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.deleteCommand=false] Whether to delete the user command message or not
* @arg {String} [options.description="No description"] A short description of the command to show in the default help command
* @arg {Boolean} [options.dmOnly=false] Whether to prevent the command from being used in guilds or not
* @arg {Function | String} [options.errorMessage] A string or a function that returns a string to show if the execution of the command handler somehow fails.
* @arg {String} [options.fullDescription="No full description"] A detailed description of the command to show in the default help command
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the command from being used in Direct Messages or not
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list
* @arg {Object} [options.hooks] A set of functions to be executed at different times throughout the command's processing
* @arg {Function} [options.hooks.preCommand] A function that is executed before any permission or cooldown checks is made. The function is passed the command message and arguments as parameters.
* @arg {Function} [options.hooks.postCheck] A function that is executed after all checks have cleared, but before the command is executed. The function is passed the command message, arguments, and if command checks were passed as parameters.
* @arg {Function} [options.hooks.postExecution] A function that is executed after the command is executed, regardless of the final failed state of the command. The function is passed the command message, arguments, and if execution succeeded as parameters.
* @arg {Function} [options.hooks.postCommand] A function that is executed after a response has been posted, and the command has finished processing. The function is passed the command message, arguments, and the response message (if applicable) as parameters.
* @arg {Function | String} [options.invalidUsageMessage] A string or a function that returns a string to show when a command was improperly used
* @arg {Function | String} [options.permissionMessage] A string or a function that returns a string to show when the user doesn't have permissions to use the command
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function, but with an extra userID parameter for generator functions (`function(msg, args, userID)`) describing the user that made the reaction
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.requirements] A set of factors that limit who can call the command
* @arg {Function | Array<String>} [options.requirements.userIDs] An array or a function that returns an array of user IDs representing users that can call the command
* @arg {Function | Object} [options.requirements.permissions] An object or a function that returns an object containing permission keys the user must match to use the command
* i.e.:

@@ -409,20 +438,10 @@ * ```

* "manageMessages": true
* }```
* In the above example, the user must not have administrator permissions, but must have manageMessages to use the subcommand
* @arg {Function | Array<String>} [options.requirements.roleIDs] An array or a function that returns an array of role IDs that would allow a user to use the subcommand
* @arg {Function | Array<String>} [options.requirements.roleNames] An array or a function that returns an array of role names that would allow a user to use the subcommand
* @arg {Number} [options.cooldown] The cooldown between subcommand usage in milliseconds
* }
* ```
* In the above example, the user must not have administrator permissions, but must have manageMessages to use the command
* @arg {Function | Array<String>} [options.requirements.roleIDs] An array or a function that returns an array of role IDs that would allow a user to use the command
* @arg {Function | Array<String>} [options.requirements.roleNames] An array or a function that returns an array of role names that would allow a user to use the command
* @arg {Function} [options.requirements.custom] A function that accepts a message and returns true if the command should be run
* @arg {Boolean} [option.restartCooldown=false] Whether or not to restart a command's cooldown every time it's used.
* @arg {Number} [option.cooldownReturns=0] Number of times to return a message when the command is used during it's cooldown. Once the cooldown expires this is reset. Set this to 0 to always return a message.
* @arg {Function | String} [options.cooldownMessage] A string or a function that returns a string to show when the command is on cooldown. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.invalidUsageMessage] A string or a function that returns a string to show when a command was improperly used. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.permissionMessage] A string or a function that returns a string to show when the user doesn't have permissions to use the command. The function is passed the Message object as a parameter.
* @arg {Function | String} [options.errorMessage] A string or a function that returns a string to show if the execution of the command handler somehow fails. The function is passed the Message object as a parameter.
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list.
* @arg {String} [options.usage] Details on how to call the command to show in the default help command
* @returns {Command}

@@ -429,0 +448,0 @@ */

@@ -140,2 +140,6 @@ "use strict";

}
if(!msg.author) {
this.emit("warn", `Message ${msg.id} has author=${msg.author} | Channel ${msg.channel.id}, timestamp ${Date.now()}`);
return;
}

@@ -227,3 +231,3 @@ msg.command = false;

this.unwatchMessage(msg.id, msg.channel.guild && msg.channel.id);
Promise.resolve(action.execute(msg, activeMessage.args)).then((resp) => {
Promise.resolve(action.execute(msg, activeMessage.args, userID)).then((resp) => {
if(resp != null) {

@@ -236,3 +240,3 @@ return this.editMessage(msg.channel.id, msg.id, resp);

case "edit": {
Promise.resolve(action.execute(msg, activeMessage.args)).then((resp) => {
Promise.resolve(action.execute(msg, activeMessage.args, userID)).then((resp) => {
if(resp != null) {

@@ -307,13 +311,34 @@ return this.editMessage(msg.channel.id, msg.id, resp);

* @arg {Array<String>} [options.aliases] An array of command aliases
* @arg {Boolean} [options.argsRequired=false] If arguments are required or not
* @arg {Boolean} [options.caseInsensitive=false] Whether the command label (and aliases) is case insensitive or not
* @arg {Number} [options.cooldown] The cooldown between command usage in milliseconds
* @arg {Object} [options.cooldownExclusions={}] A set of factors that limit where cooldowns are active
* @arg {Array<String>} [options.cooldownExclusions.userIDs] An array of user IDs representing users that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.guildIDs] An array of guild IDs representing guilds that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.channelIDs] An array of channel IDs representing channels that are not affected by cooldowns.
* @arg {Function | String} [options.cooldownMessage] A string or a function that returns a string to show when the command is on cooldown
* @arg {Number} [option.cooldownReturns=0] Number of times to return a message when the command is used during it's cooldown. Once the cooldown expires this is reset. Set this to 0 to always return a message.
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.deleteCommand=false] Whether to delete the user command message or not
* @arg {Boolean} [options.argsRequired=false] If arguments are required or not
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the command from being used in Direct Messages or not
* @arg {String} [options.description="No description"] A short description of the command to show in the default help command
* @arg {Boolean} [options.dmOnly=false] Whether to prevent the command from being used in guilds or not
* @arg {String} [options.description="No description"] A short description of the command to show in the default help command
* @arg {Function | String} [options.errorMessage] A string or a function that returns a string to show if the execution of the command handler somehow fails.
* @arg {String} [options.fullDescription="No full description"] A detailed description of the command to show in the default help command
* @arg {String} [options.usage] Details on how to call the command to show in the default help command
* @arg {Boolean} [options.guildOnly=false] Whether to prevent the command from being used in Direct Messages or not
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list
* @arg {Object} [options.hooks] A set of functions to be executed at different times throughout the command's processing
* @arg {Function} [options.hooks.preCommand] A function that is executed before any permission or cooldown checks is made. The function is passed the command message and arguments as parameters.
* @arg {Function} [options.hooks.postCheck] A function that is executed after all checks have cleared, but before the command is executed. The function is passed the command message, arguments, and if command checks were passed as parameters.
* @arg {Function} [options.hooks.postExecution] A function that is executed after the command is executed, regardless of the final failed state of the command. The function is passed the command message, arguments, and if execution succeeded as parameters.
* @arg {Function} [options.hooks.postCommand] A function that is executed after a response has been posted, and the command has finished processing. The function is passed the command message, arguments, and the response message (if applicable) as parameters.
* @arg {Function | String} [options.invalidUsageMessage] A string or a function that returns a string to show when a command was improperly used
* @arg {Function | String} [options.permissionMessage] A string or a function that returns a string to show when the user doesn't have permissions to use the command
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function, but with an extra userID parameter for generator functions (`function(msg, args, userID)`) describing the user that made the reaction
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.requirements] A set of factors that limit who can call the command
* @arg {Array<String>} [options.requirements.userIDs] An array of user IDs representing users that can call the command
* @arg {Object} [options.requirements.permissions] An object containing permission keys the user must match to use the command
* @arg {Function | Array<String>} [options.requirements.userIDs] An array or a function that returns an array of user IDs representing users that can call the command
* @arg {Function | Object} [options.requirements.permissions] An object or a function that returns an object containing permission keys the user must match to use the command
* i.e.:

@@ -324,22 +349,10 @@ * ```

* "manageMessages": true
* }```
* }
* ```
* In the above example, the user must not have administrator permissions, but must have manageMessages to use the command
* @arg {Array<String>} [options.requirements.roleIDs] An array of role IDs that would allow a user to use the command
* @arg {Array<String>} [options.requirements.roleNames] An array of role names that would allow a user to use the command
* @arg {Number} [options.cooldown] The cooldown between command usage in milliseconds
* @arg {Object} [options.cooldownExclusions={}] A set of factors that limit where cooldowns are active
* @arg {Array<String>} [options.cooldownExclusions.userIDs] An array of user IDs representing users that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.guildIDs] An array of guild IDs representing guilds that are not affected by cooldowns.
* @arg {Array<String>} [options.cooldownExclusions.channelIDs] An array of channel IDs representing channels that are not affected by cooldowns.
* @arg {String} [options.cooldownMessage] A message to show when the command is on cooldown
* @arg {String} [options.invalidUsageMessage] A message to show when a command was improperly used
* @arg {String} [options.permissionMessage] A message to show when the user doesn't have permissions to use the command
* @arg {String} [options.errorMessage] A message to show if the execution of the command handler somehow fails.
* @arg {Array<{emoji: String, type: String, response: Function | String | Array<Function | String>}>} [options.reactionButtons] An array of objects specifying reaction buttons
* `emoji` specifies the button emoji. Custom emojis should be in format `emojiName:emojiID`
* `type` specifies the type of the reaction button, either "edit" or "cancel"
* `response` specifies the content to edit the message to when the reaction button is pressed. This accepts the same arguments as the `generator` parameter of this function
* @arg {Number} [options.reactionButtonTimeout=60000] Time (in milliseconds) to wait before invalidating the command's reaction buttons
* @arg {Object} [options.defaultSubcommandOptions={}] Default subcommand options. This object takes the same options as a normal Command
* @arg {Boolean} [options.hidden=false] Whether or not the command should be hidden from the default help command list.
* @arg {Function | Array<String>} [options.requirements.roleIDs] An array or a function that returns an array of role IDs that would allow a user to use the command
* @arg {Function | Array<String>} [options.requirements.roleNames] An array or a function that returns an array of role names that would allow a user to use the command
* @arg {Function} [options.requirements.custom] A function that accepts a message and returns true if the command should be run
* @arg {Boolean} [option.restartCooldown=false] Whether or not to restart a command's cooldown every time it's used.
* @arg {String} [options.usage] Details on how to call the command to show in the default help command
* @returns {Command}

@@ -346,0 +359,0 @@ */

@@ -22,2 +22,3 @@ "use strict";

latency: 500,
offset: client.options.ratelimiterOffset,
raw: [500, 500, 500, 500, 500, 500, 500, 500, 500, 500],

@@ -179,3 +180,3 @@ timeOffset: 0,

this.latencyRef.raw.push(latency);
this.latencyRef.latency = ~~(this.latencyRef.latency - this.latencyRef.raw.shift() / 10 + latency / 10);
this.latencyRef.latency = this.latencyRef.latency - ~~(this.latencyRef.raw.shift() / 10) + ~~(latency / 10);

@@ -182,0 +183,0 @@ var headerNow = Date.parse(resp.headers["date"]);

@@ -26,2 +26,4 @@ "use strict";

* @prop {Object[]} embeds Array of embeds
* @prop {Object?} activity The activity specified in the message
* @prop {Object?} application The application of the activity in the message
* @prop {Object} reactions An object containing the reactions on the message

@@ -114,2 +116,4 @@ * @prop {Number} reactions.count The number of times the reaction was used

this.embeds = data.embeds !== undefined ? data.embeds : this.embeds;
this.activity = data.activity !== undefined ? data.activity : this.activity;
this.application = data.application !== undefined ? data.application : this.application;

@@ -116,0 +120,0 @@ if(data.reactions) {

@@ -53,7 +53,8 @@ "use strict";

var now = Date.now();
var offset = this.latencyRef.latency + (this.latencyRef.offset || 0);
if(!this.reset) {
this.reset = now - this.latencyRef.latency;
this.reset = now - offset;
this.remaining = this.limit;
} else if(this.reset < now - this.latencyRef.latency) {
this.reset = now - this.latencyRef.latency + (this.resetInterval || 0);
} else if(this.reset < now - offset) {
this.reset = now - offset + (this.resetInterval || 0);
this.remaining = this.limit;

@@ -66,3 +67,3 @@ }

this.check(true);
}, Math.max(0, (this.reset || 0) - now) + this.latencyRef.latency);
}, Math.max(0, (this.reset || 0) - now) + offset);
return;

@@ -69,0 +70,0 @@ }

@@ -170,6 +170,8 @@ "use strict";

if(this.receiveStreamOpus) {
this.receiveStreamOpus.destroy();
this.receiveStreamOpus.removeAllListeners();
this.receiveStreamOpus = null;
}
if(this.receiveStreamPCM) {
this.receiveStreamPCM.destroy();
this.receiveStreamPCM.removeAllListeners();
this.receiveStreamPCM = null;
}

@@ -176,0 +178,0 @@ }

{
"name": "eris",
"version": "0.8.4",
"version": "0.8.5",
"description": "A NodeJS Discord library",

@@ -5,0 +5,0 @@ "main": "./index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc