mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Make grammer gooder
This commit is contained in:
@@ -67,8 +67,8 @@ class Collection extends Map {
|
||||
* collection.findAll('username', 'Bob');
|
||||
*/
|
||||
findAll(key, value) {
|
||||
if (typeof key !== 'string') throw new TypeError('key must be a string');
|
||||
if (typeof value === 'undefined') throw new Error('value must be specified');
|
||||
if (typeof key !== 'string') throw new TypeError('Key must be a string.');
|
||||
if (typeof value === 'undefined') throw new Error('Value must be specified.');
|
||||
const results = [];
|
||||
for (const item of this.values()) {
|
||||
if (item[key] === value) results.push(item);
|
||||
@@ -85,8 +85,8 @@ class Collection extends Map {
|
||||
* collection.find('id', '123123...');
|
||||
*/
|
||||
find(key, value) {
|
||||
if (typeof key !== 'string') throw new TypeError('key must be a string');
|
||||
if (typeof value === 'undefined') throw new Error('value must be specified');
|
||||
if (typeof key !== 'string') throw new TypeError('Key must be a string.');
|
||||
if (typeof value === 'undefined') throw new Error('Value must be specified.');
|
||||
for (const item of this.values()) {
|
||||
if (item[key] === value) return item;
|
||||
}
|
||||
|
||||
@@ -65,13 +65,13 @@ exports.ChannelTypes = {
|
||||
exports.Package = require('../../package.json');
|
||||
|
||||
exports.Errors = {
|
||||
NO_TOKEN: 'request to use token, but token was unavailable to the client',
|
||||
NO_BOT_ACCOUNT: 'you should ideally be using a bot account!',
|
||||
BAD_WS_MESSAGE: 'a bad message was received from the websocket - bad compression or not json',
|
||||
TOOK_TOO_LONG: 'something took too long to do',
|
||||
NOT_A_PERMISSION: 'that is not a valid permission string or number',
|
||||
INVALID_RATE_LIMIT_METHOD: 'unknown rate limiting method',
|
||||
BAD_LOGIN: 'incorrect login details were provided',
|
||||
NO_TOKEN: 'Request to use token, but token was unavailable to the client.',
|
||||
NO_BOT_ACCOUNT: 'You ideally should be using a bot account!',
|
||||
BAD_WS_MESSAGE: 'A bad message was received from the websocket; either bad compression, or not JSON.',
|
||||
TOOK_TOO_LONG: 'Something took too long to do.',
|
||||
NOT_A_PERMISSION: 'Invalid permission string or number.',
|
||||
INVALID_RATE_LIMIT_METHOD: 'Unknown rate limiting method.',
|
||||
BAD_LOGIN: 'Incorrect login details were provided.',
|
||||
};
|
||||
|
||||
const API = `https://discordapp.com/api/v${exports.DefaultOptions.protocol_version}`;
|
||||
|
||||
Reference in New Issue
Block a user