copy eslint + tslint from Discord.js (v13)
This commit is contained in:
@@ -126,7 +126,7 @@ class Client extends BaseClient {
|
||||
this.users = new UserManager(this);
|
||||
|
||||
/** Patch
|
||||
*
|
||||
*
|
||||
*/
|
||||
this.relationships = new RelationshipsManager(this);
|
||||
this.setting = new ClientUserSettingManager(this);
|
||||
@@ -244,44 +244,41 @@ class Client extends BaseClient {
|
||||
* Update Cloudflare Cookie and Discord Fingerprint
|
||||
*/
|
||||
async updateCookie() {
|
||||
/* Auto find fingerprint and add Cookie */
|
||||
let cookie = '';
|
||||
await require('axios')({
|
||||
method: 'get',
|
||||
url: 'https://discord.com/api/v9/experiments',
|
||||
headers: this.options.http.headers,
|
||||
})
|
||||
.then((res) => {
|
||||
if (!'set-cookie' in res.headers) return;
|
||||
res.headers['set-cookie'].map((line) => {
|
||||
line.split('; ').map((arr) => {
|
||||
if (
|
||||
arr.startsWith('Expires') ||
|
||||
arr.startsWith('Path') ||
|
||||
arr.startsWith('Domain') ||
|
||||
arr.startsWith('HttpOnly') ||
|
||||
arr.startsWith('Secure') ||
|
||||
arr.startsWith('Max-Age') ||
|
||||
arr.startsWith('SameSite')
|
||||
) {
|
||||
return;
|
||||
} else {
|
||||
cookie += `${arr}; `;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.options.http.headers['Cookie'] = `${cookie}locale=en`;
|
||||
this.options.http.headers['x-fingerprint'] = res.data.fingerprint;
|
||||
this.emit(Events.DEBUG, `Added Cookie: ${cookie}`);
|
||||
this.emit(Events.DEBUG, `Added Fingerprint: ${res.data.fingerprint}`);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.emit(
|
||||
Events.DEBUG,
|
||||
`Finding Cookie and Fingerprint failed: ${err.message}`,
|
||||
);
|
||||
});
|
||||
}
|
||||
/* Auto find fingerprint and add Cookie */
|
||||
let cookie = '';
|
||||
await require('axios')({
|
||||
method: 'get',
|
||||
url: 'https://discord.com/api/v9/experiments',
|
||||
headers: this.options.http.headers,
|
||||
})
|
||||
.then(res => {
|
||||
if (!'set-cookie' in res.headers) return;
|
||||
res.headers['set-cookie'].map(line => {
|
||||
line.split('; ').map(arr => {
|
||||
if (
|
||||
arr.startsWith('Expires') ||
|
||||
arr.startsWith('Path') ||
|
||||
arr.startsWith('Domain') ||
|
||||
arr.startsWith('HttpOnly') ||
|
||||
arr.startsWith('Secure') ||
|
||||
arr.startsWith('Max-Age') ||
|
||||
arr.startsWith('SameSite')
|
||||
) {
|
||||
return;
|
||||
} else {
|
||||
cookie += `${arr}; `;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.options.http.headers['Cookie'] = `${cookie}locale=en`;
|
||||
this.options.http.headers['x-fingerprint'] = res.data.fingerprint;
|
||||
this.emit(Events.DEBUG, `Added Cookie: ${cookie}`);
|
||||
this.emit(Events.DEBUG, `Added Fingerprint: ${res.data.fingerprint}`);
|
||||
})
|
||||
.catch(err => {
|
||||
this.emit(Events.DEBUG, `Finding Cookie and Fingerprint failed: ${err.message}`);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the client in, establishing a WebSocket connection to Discord.
|
||||
|
@@ -60,7 +60,10 @@ class InteractionCreateAction extends Action {
|
||||
InteractionType = AutocompleteInteraction;
|
||||
break;
|
||||
default:
|
||||
client.emit(Events.DEBUG, `[INTERACTION] Received [BOT] / Send (Selfbot) interactionID ${data.id} with unknown type: ${data.type}`);
|
||||
client.emit(
|
||||
Events.DEBUG,
|
||||
`[INTERACTION] Received [BOT] / Send (Selfbot) interactionID ${data.id} with unknown type: ${data.type}`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -217,7 +217,7 @@ class WebSocketManager extends EventEmitter {
|
||||
this.shardQueue.add(shard);
|
||||
|
||||
if (shard.sessionId) {
|
||||
this.debug(`Session id is present, attempting an immediate reconnect...`, shard);
|
||||
this.debug('Session id is present, attempting an immediate reconnect...', shard);
|
||||
this.reconnect();
|
||||
} else {
|
||||
shard.destroy({ reset: true, emit: false, log: false });
|
||||
@@ -279,7 +279,7 @@ class WebSocketManager extends EventEmitter {
|
||||
} catch (error) {
|
||||
this.debug(`Couldn't reconnect or fetch information about the gateway. ${error}`);
|
||||
if (error.httpStatus !== 401) {
|
||||
this.debug(`Possible network error occurred. Retrying in 5s...`);
|
||||
this.debug('Possible network error occurred. Retrying in 5s...');
|
||||
await sleep(5_000);
|
||||
this.reconnecting = false;
|
||||
return this.reconnect();
|
||||
|
@@ -13,7 +13,7 @@ let zlib;
|
||||
|
||||
try {
|
||||
zlib = require('zlib-sync');
|
||||
} catch { } // eslint-disable-line no-empty
|
||||
} catch {} // eslint-disable-line no-empty
|
||||
|
||||
/**
|
||||
* Represents a Shard's WebSocket connection
|
||||
@@ -487,8 +487,9 @@ class WebSocketShard extends EventEmitter {
|
||||
() => {
|
||||
this.debug(
|
||||
`Shard ${hasGuildsIntent ? 'did' : 'will'} not receive any more guild packets` +
|
||||
`${hasGuildsIntent ? ` in ${waitGuildTimeout} ms` : ''}.\nUnavailable guild count: ${this.expectedGuilds.size
|
||||
}`,
|
||||
`${hasGuildsIntent ? ` in ${waitGuildTimeout} ms` : ''}.\nUnavailable guild count: ${
|
||||
this.expectedGuilds.size
|
||||
}`,
|
||||
);
|
||||
|
||||
this.readyTimeout = null;
|
||||
|
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
if (!data.application_commands[0]) return;
|
||||
for (const command of data.application_commands) {
|
||||
const user = client.users.cache.get(command.application_id);
|
||||
if (!user) continue;
|
||||
user.applications._add(command, true);
|
||||
};
|
||||
};
|
||||
if (!data.application_commands[0]) return;
|
||||
for (const command of data.application_commands) {
|
||||
const user = client.users.cache.get(command.application_id);
|
||||
if (!user) continue;
|
||||
user.applications._add(command, true);
|
||||
}
|
||||
};
|
||||
|
@@ -4,32 +4,34 @@ const { Collection } = require('@discordjs/collection');
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
// console.log(data);
|
||||
// console.log(data.ops[0])
|
||||
const guild = client.guilds.cache.get(data.guild_id);
|
||||
if (!guild) return;
|
||||
const members = new Collection();
|
||||
// Get Member from side Discord Channel (online counting if large server)
|
||||
for (const object of data.ops) {
|
||||
if (object.op == 'SYNC') {
|
||||
for (const member_ of object.items) {
|
||||
const member = member_.member;
|
||||
if (!member) continue;
|
||||
members.set(member.user.id, guild.members._add(member));
|
||||
if (member.presence)
|
||||
guild.presences._add(Object.assign(member.presence, { guild }));
|
||||
}
|
||||
} else if (object.op == 'INVALIDATE') {
|
||||
console.warn(`Invalidate [${object.range[0]}, ${object.range[1]}]`);
|
||||
} else if (object.op == 'UPDATE' || object.op == 'INSERT') {
|
||||
const member = object.item.member;
|
||||
if (!member) continue;
|
||||
members.set(member.user.id, guild.members._add(member));
|
||||
if (member.presence)
|
||||
guild.presences._add(Object.assign(member.presence, { guild }));
|
||||
} else if (object.op == 'DELETE') {
|
||||
// nothing;
|
||||
// console.log(data);
|
||||
// console.log(data.ops[0])
|
||||
const guild = client.guilds.cache.get(data.guild_id);
|
||||
if (!guild) return;
|
||||
const members = new Collection();
|
||||
// Get Member from side Discord Channel (online counting if large server)
|
||||
for (const object of data.ops) {
|
||||
if (object.op == 'SYNC') {
|
||||
for (const member_ of object.items) {
|
||||
const member = member_.member;
|
||||
if (!member) continue;
|
||||
members.set(member.user.id, guild.members._add(member));
|
||||
if (member.presence) {
|
||||
guild.presences._add(Object.assign(member.presence, { guild }));
|
||||
}
|
||||
}
|
||||
} else if (object.op == 'INVALIDATE') {
|
||||
console.warn(`Invalidate [${object.range[0]}, ${object.range[1]}]`);
|
||||
} else if (object.op == 'UPDATE' || object.op == 'INSERT') {
|
||||
const member = object.item.member;
|
||||
if (!member) continue;
|
||||
members.set(member.user.id, guild.members._add(member));
|
||||
if (member.presence) {
|
||||
guild.presences._add(Object.assign(member.presence, { guild }));
|
||||
}
|
||||
} else if (object.op == 'DELETE') {
|
||||
// nothing;
|
||||
}
|
||||
client.emit(Events.GUILD_MEMBER_LIST_UPDATE, members, guild, data);
|
||||
}
|
||||
client.emit(Events.GUILD_MEMBER_LIST_UPDATE, members, guild, data);
|
||||
};
|
||||
|
@@ -2,6 +2,6 @@
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, packet) => {
|
||||
if (client.user.bot) client.actions.InteractionCreate.handle(packet.d);
|
||||
if (client.user.bot) client.actions.InteractionCreate.handle(packet.d);
|
||||
else client.emit(Events.INTERACTION_CREATE, packet.d);
|
||||
};
|
||||
|
@@ -2,5 +2,5 @@
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
client.emit(Events.INTERACTION_FAILED, data);
|
||||
client.emit(Events.INTERACTION_FAILED, data);
|
||||
};
|
||||
|
@@ -2,5 +2,5 @@
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
client.emit(Events.INTERACTION_SUCCESS, data);
|
||||
};
|
||||
client.emit(Events.INTERACTION_SUCCESS, data);
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
// client.user.messageMentions.delete(data.channel_id);
|
||||
};
|
||||
// client.user.messageMentions.delete(data.channel_id);
|
||||
};
|
||||
|
@@ -5,112 +5,99 @@ const chalk = require('chalk');
|
||||
const axios = require('axios');
|
||||
const Discord = require('../../../index');
|
||||
const RichPresence = require('discord-rpc-contructor');
|
||||
const { ChannelTypes } = require('../../../util/Constants');
|
||||
|
||||
const checkUpdate = async () => {
|
||||
const res_ = await axios.get(
|
||||
`https://registry.npmjs.com/${encodeURIComponent(
|
||||
'discord.js-selfbot-v13',
|
||||
)}`,
|
||||
);
|
||||
const lastest_tag = res_.data['dist-tags'].latest;
|
||||
// Checking if the package is outdated
|
||||
// Stable version
|
||||
if (lastest_tag !== Discord.version && Discord.version.includes('-') == false) {
|
||||
return console.log(`${chalk.yellowBright(
|
||||
'[WARNING]',
|
||||
)} New Discord.js-selfbot-v13 version.
|
||||
Old Version: ${chalk.redBright(
|
||||
Discord.version,
|
||||
)} => New Version: ${chalk.greenBright(lastest_tag)}`);
|
||||
}
|
||||
return console.log(
|
||||
`${chalk.greenBright(
|
||||
'[OK]',
|
||||
)} Discord.js-selfbot-v13 is up to date. Version: ${chalk.blueBright(
|
||||
Discord.version,
|
||||
)}`,
|
||||
);
|
||||
const res_ = await axios.get(`https://registry.npmjs.com/${encodeURIComponent('discord.js-selfbot-v13')}`);
|
||||
const lastest_tag = res_.data['dist-tags'].latest;
|
||||
// Checking if the package is outdated
|
||||
// Stable version
|
||||
if (lastest_tag !== Discord.version && Discord.version.includes('-') == false) {
|
||||
return console.log(`${chalk.yellowBright('[WARNING]')} New Discord.js-selfbot-v13 version.
|
||||
Old Version: ${chalk.redBright(Discord.version)} => New Version: ${chalk.greenBright(lastest_tag)}`);
|
||||
}
|
||||
return console.log(
|
||||
`${chalk.greenBright('[OK]')} Discord.js-selfbot-v13 is up to date. Version: ${chalk.blueBright(Discord.version)}`,
|
||||
);
|
||||
};
|
||||
|
||||
const customStatusAuto = async (client) => {
|
||||
let custom_status;
|
||||
if (
|
||||
client.setting.rawSetting.custom_status?.text ||
|
||||
res.rawSetting.custom_status?.emoji_name
|
||||
) {
|
||||
custom_status = new RichPresence.CustomStatus();
|
||||
if (client.setting.rawSetting.custom_status.emoji_id) {
|
||||
const emoji = await client.emojis.resolve(
|
||||
client.setting.rawSetting.custom_status.emoji_id,
|
||||
);
|
||||
if (emoji) custom_status.setDiscordEmoji(emoji);
|
||||
} else {
|
||||
custom_status.setUnicodeEmoji(
|
||||
client.setting.rawSetting.custom_status.emoji_name,
|
||||
);
|
||||
}
|
||||
custom_status.setState(client.setting.rawSetting.custom_status?.text);
|
||||
client.user.setPresence({
|
||||
activities: custom_status ? [custom_status.toDiscord()] : [],
|
||||
status: client.setting.rawSetting.status,
|
||||
});
|
||||
}
|
||||
}
|
||||
const customStatusAuto = async client => {
|
||||
let custom_status;
|
||||
if (client.setting.rawSetting.custom_status?.text || res.rawSetting.custom_status?.emoji_name) {
|
||||
custom_status = new RichPresence.CustomStatus();
|
||||
if (client.setting.rawSetting.custom_status.emoji_id) {
|
||||
const emoji = await client.emojis.resolve(client.setting.rawSetting.custom_status.emoji_id);
|
||||
if (emoji) custom_status.setDiscordEmoji(emoji);
|
||||
} else {
|
||||
custom_status.setUnicodeEmoji(client.setting.rawSetting.custom_status.emoji_name);
|
||||
}
|
||||
custom_status.setState(client.setting.rawSetting.custom_status?.text);
|
||||
client.user.setPresence({
|
||||
activities: custom_status ? [custom_status.toDiscord()] : [],
|
||||
status: client.setting.rawSetting.status,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = (client, { d: data }, shard) => {
|
||||
if (client.options.checkUpdate) {
|
||||
try {
|
||||
checkUpdate();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
client.session_id = data.session_id;
|
||||
if (client.user) {
|
||||
client.user._patch(data.user);
|
||||
} else {
|
||||
ClientUser ??= require('../../../structures/ClientUser');
|
||||
client.user = new ClientUser(client, data.user);
|
||||
client.users.cache.set(client.user.id, client.user);
|
||||
}
|
||||
console.log(data.private_channels);
|
||||
if (client.options.checkUpdate) {
|
||||
try {
|
||||
checkUpdate();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
client.session_id = data.session_id;
|
||||
if (client.user) {
|
||||
client.user._patch(data.user);
|
||||
} else {
|
||||
ClientUser ??= require('../../../structures/ClientUser');
|
||||
client.user = new ClientUser(client, data.user);
|
||||
client.users.cache.set(client.user.id, client.user);
|
||||
}
|
||||
|
||||
client.user.setAFK(false);
|
||||
client.user.setAFK(false);
|
||||
|
||||
client.setting._patch(data.user_settings);
|
||||
client.setting._patch(data.user_settings);
|
||||
|
||||
client.user.connectedAccounts = data.connected_accounts ?? [];
|
||||
client.user.connectedAccounts = data.connected_accounts ?? [];
|
||||
|
||||
for (const [userid, note] of Object.entries(data.notes)) {
|
||||
client.user.notes.set(userid, note);
|
||||
}
|
||||
for (const [userid, note] of Object.entries(data.notes)) {
|
||||
client.user.notes.set(userid, note);
|
||||
}
|
||||
|
||||
if (client.options.readyStatus) {
|
||||
customStatusAuto(client);
|
||||
}
|
||||
for (const private_channel of data.private_channels) {
|
||||
client.channels._add(private_channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* read_state: Return Array:
|
||||
* {
|
||||
* mention_count: 14, // ok it's ping count
|
||||
* last_pin_timestamp: '1970-01-01T00:00:00+00:00', // why discord ?
|
||||
* last_message_id: 0, // :)
|
||||
* id: '840218426969817119' // channel id
|
||||
* },
|
||||
*/
|
||||
if (client.options.readyStatus) {
|
||||
customStatusAuto(client);
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* read_state: Return Array:
|
||||
* {
|
||||
* mention_count: 14, // ok it's ping count
|
||||
* last_pin_timestamp: '1970-01-01T00:00:00+00:00', // why discord ?
|
||||
* last_message_id: 0, // :)
|
||||
* id: '840218426969817119' // channel id
|
||||
* },
|
||||
*/
|
||||
|
||||
/*
|
||||
for (const object of data.read_state) {
|
||||
if (object.mention_count == 0) continue;
|
||||
client.user.messageMentions.set(object.id, object);
|
||||
}
|
||||
*/
|
||||
|
||||
for (const guild of data.guilds) {
|
||||
guild.shardId = shard.id;
|
||||
client.guilds._add(guild);
|
||||
}
|
||||
for (const guild of data.guilds) {
|
||||
guild.shardId = shard.id;
|
||||
client.guilds._add(guild);
|
||||
}
|
||||
|
||||
client.relationships._setup(data.relationships);
|
||||
client.relationships._setup(data.relationships);
|
||||
|
||||
shard.checkReady();
|
||||
shard.checkReady();
|
||||
};
|
||||
|
@@ -3,13 +3,13 @@
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
data.user ? client.users._add(data.user) : null;
|
||||
client.relationships.cache.set(data.id, data.type);
|
||||
/**
|
||||
* Emitted whenever a relationship is updated.
|
||||
* @event Client#relationshipUpdate
|
||||
* @param {UserID} user The userID that was updated
|
||||
* @param {Number} type The new relationship type
|
||||
*/
|
||||
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);
|
||||
data.user ? client.users._add(data.user) : null;
|
||||
client.relationships.cache.set(data.id, data.type);
|
||||
/**
|
||||
* Emitted whenever a relationship is updated.
|
||||
* @event Client#relationshipUpdate
|
||||
* @param {UserID} user The userID that was updated
|
||||
* @param {Number} type The new relationship type
|
||||
*/
|
||||
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);
|
||||
};
|
||||
|
@@ -3,11 +3,11 @@
|
||||
const { Events } = require('../../../util/Constants');
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
client.relationships.cache.delete(data.id);
|
||||
/**
|
||||
* Emitted whenever a relationship is updated.
|
||||
* @event Client#relationshipUpdate
|
||||
* @param {UserID} user The userID that was updated
|
||||
*/
|
||||
client.emit(Events.RELATIONSHIP_REMOVE, data.id);
|
||||
client.relationships.cache.delete(data.id);
|
||||
/**
|
||||
* Emitted whenever a relationship is updated.
|
||||
* @event Client#relationshipUpdate
|
||||
* @param {UserID} user The userID that was updated
|
||||
*/
|
||||
client.emit(Events.RELATIONSHIP_REMOVE, data.id);
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
client.user.notes.set(data.id, data.note);
|
||||
};
|
||||
client.user.notes.set(data.id, data.note);
|
||||
};
|
||||
|
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (client, { d: data }) => {
|
||||
client.setting._patch(data);
|
||||
};
|
||||
client.setting._patch(data);
|
||||
};
|
||||
|
@@ -1,80 +1,71 @@
|
||||
'use strict';
|
||||
|
||||
const handlers = Object.fromEntries([
|
||||
['READY', require('./READY')],
|
||||
['RESUMED', require('./RESUMED')],
|
||||
['RELATIONSHIP_ADD', require('./RELATIONSHIP_ADD')],
|
||||
['RELATIONSHIP_REMOVE', require('./RELATIONSHIP_REMOVE')],
|
||||
['APPLICATION_COMMAND_CREATE', require('./APPLICATION_COMMAND_CREATE')],
|
||||
['APPLICATION_COMMAND_DELETE', require('./APPLICATION_COMMAND_DELETE')],
|
||||
['APPLICATION_COMMAND_UPDATE', require('./APPLICATION_COMMAND_UPDATE')],
|
||||
['GUILD_CREATE', require('./GUILD_CREATE')],
|
||||
['GUILD_DELETE', require('./GUILD_DELETE')],
|
||||
['GUILD_UPDATE', require('./GUILD_UPDATE')],
|
||||
['INVITE_CREATE', require('./INVITE_CREATE')],
|
||||
['INVITE_DELETE', require('./INVITE_DELETE')],
|
||||
['GUILD_MEMBER_ADD', require('./GUILD_MEMBER_ADD')],
|
||||
['GUILD_MEMBER_REMOVE', require('./GUILD_MEMBER_REMOVE')],
|
||||
['GUILD_MEMBER_UPDATE', require('./GUILD_MEMBER_UPDATE')],
|
||||
['GUILD_MEMBERS_CHUNK', require('./GUILD_MEMBERS_CHUNK')],
|
||||
['GUILD_MEMBER_LIST_UPDATE', require('./GUILD_MEMBER_LIST_UPDATE.js')],
|
||||
[
|
||||
'GUILD_APPLICATION_COMMANDS_UPDATE',
|
||||
require('./GUILD_APPLICATION_COMMANDS_UPDATE.js'),
|
||||
],
|
||||
['GUILD_INTEGRATIONS_UPDATE', require('./GUILD_INTEGRATIONS_UPDATE')],
|
||||
['GUILD_ROLE_CREATE', require('./GUILD_ROLE_CREATE')],
|
||||
['GUILD_ROLE_DELETE', require('./GUILD_ROLE_DELETE')],
|
||||
['GUILD_ROLE_UPDATE', require('./GUILD_ROLE_UPDATE')],
|
||||
['GUILD_BAN_ADD', require('./GUILD_BAN_ADD')],
|
||||
['GUILD_BAN_REMOVE', require('./GUILD_BAN_REMOVE')],
|
||||
['GUILD_EMOJIS_UPDATE', require('./GUILD_EMOJIS_UPDATE')],
|
||||
['CHANNEL_CREATE', require('./CHANNEL_CREATE')],
|
||||
['CHANNEL_DELETE', require('./CHANNEL_DELETE')],
|
||||
['CHANNEL_UPDATE', require('./CHANNEL_UPDATE')],
|
||||
['CHANNEL_PINS_UPDATE', require('./CHANNEL_PINS_UPDATE')],
|
||||
['MESSAGE_CREATE', require('./MESSAGE_CREATE')],
|
||||
['MESSAGE_DELETE', require('./MESSAGE_DELETE')],
|
||||
['MESSAGE_UPDATE', require('./MESSAGE_UPDATE')],
|
||||
['MESSAGE_DELETE_BULK', require('./MESSAGE_DELETE_BULK')],
|
||||
['MESSAGE_REACTION_ADD', require('./MESSAGE_REACTION_ADD')],
|
||||
['MESSAGE_REACTION_REMOVE', require('./MESSAGE_REACTION_REMOVE')],
|
||||
['MESSAGE_REACTION_REMOVE_ALL', require('./MESSAGE_REACTION_REMOVE_ALL')],
|
||||
['MESSAGE_REACTION_REMOVE_EMOJI', require('./MESSAGE_REACTION_REMOVE_EMOJI')],
|
||||
['THREAD_CREATE', require('./THREAD_CREATE')],
|
||||
['THREAD_UPDATE', require('./THREAD_UPDATE')],
|
||||
['THREAD_DELETE', require('./THREAD_DELETE')],
|
||||
['THREAD_LIST_SYNC', require('./THREAD_LIST_SYNC')],
|
||||
['THREAD_MEMBER_UPDATE', require('./THREAD_MEMBER_UPDATE')],
|
||||
['THREAD_MEMBERS_UPDATE', require('./THREAD_MEMBERS_UPDATE')],
|
||||
['USER_SETTINGS_UPDATE', require('./USER_SETTINGS_UPDATE')], // opcode 0
|
||||
// USER_SETTINGS_PROTO_UPDATE // opcode 0
|
||||
['MESSAGE_ACK', require('./MESSAGE_ACK')],
|
||||
['USER_NOTE_UPDATE', require('./USER_NOTE_UPDATE')],
|
||||
['USER_UPDATE', require('./USER_UPDATE')],
|
||||
['PRESENCE_UPDATE', require('./PRESENCE_UPDATE')],
|
||||
['TYPING_START', require('./TYPING_START')],
|
||||
['VOICE_STATE_UPDATE', require('./VOICE_STATE_UPDATE')],
|
||||
['VOICE_SERVER_UPDATE', require('./VOICE_SERVER_UPDATE')],
|
||||
['WEBHOOKS_UPDATE', require('./WEBHOOKS_UPDATE')],
|
||||
['INTERACTION_CREATE', require('./INTERACTION_CREATE')],
|
||||
['INTERACTION_SUCCESS', require('./INTERACTION_SUCCESS')],
|
||||
['INTERACTION_FAILED', require('./INTERACTION_FAILED')],
|
||||
['STAGE_INSTANCE_CREATE', require('./STAGE_INSTANCE_CREATE')],
|
||||
['STAGE_INSTANCE_UPDATE', require('./STAGE_INSTANCE_UPDATE')],
|
||||
['STAGE_INSTANCE_DELETE', require('./STAGE_INSTANCE_DELETE')],
|
||||
['GUILD_STICKERS_UPDATE', require('./GUILD_STICKERS_UPDATE')],
|
||||
['GUILD_SCHEDULED_EVENT_CREATE', require('./GUILD_SCHEDULED_EVENT_CREATE')],
|
||||
['GUILD_SCHEDULED_EVENT_UPDATE', require('./GUILD_SCHEDULED_EVENT_UPDATE')],
|
||||
['GUILD_SCHEDULED_EVENT_DELETE', require('./GUILD_SCHEDULED_EVENT_DELETE')],
|
||||
[
|
||||
'GUILD_SCHEDULED_EVENT_USER_ADD',
|
||||
require('./GUILD_SCHEDULED_EVENT_USER_ADD'),
|
||||
],
|
||||
[
|
||||
'GUILD_SCHEDULED_EVENT_USER_REMOVE',
|
||||
require('./GUILD_SCHEDULED_EVENT_USER_REMOVE'),
|
||||
],
|
||||
['READY', require('./READY')],
|
||||
['RESUMED', require('./RESUMED')],
|
||||
['RELATIONSHIP_ADD', require('./RELATIONSHIP_ADD')],
|
||||
['RELATIONSHIP_REMOVE', require('./RELATIONSHIP_REMOVE')],
|
||||
['APPLICATION_COMMAND_CREATE', require('./APPLICATION_COMMAND_CREATE')],
|
||||
['APPLICATION_COMMAND_DELETE', require('./APPLICATION_COMMAND_DELETE')],
|
||||
['APPLICATION_COMMAND_UPDATE', require('./APPLICATION_COMMAND_UPDATE')],
|
||||
['GUILD_CREATE', require('./GUILD_CREATE')],
|
||||
['GUILD_DELETE', require('./GUILD_DELETE')],
|
||||
['GUILD_UPDATE', require('./GUILD_UPDATE')],
|
||||
['INVITE_CREATE', require('./INVITE_CREATE')],
|
||||
['INVITE_DELETE', require('./INVITE_DELETE')],
|
||||
['GUILD_MEMBER_ADD', require('./GUILD_MEMBER_ADD')],
|
||||
['GUILD_MEMBER_REMOVE', require('./GUILD_MEMBER_REMOVE')],
|
||||
['GUILD_MEMBER_UPDATE', require('./GUILD_MEMBER_UPDATE')],
|
||||
['GUILD_MEMBERS_CHUNK', require('./GUILD_MEMBERS_CHUNK')],
|
||||
['GUILD_MEMBER_LIST_UPDATE', require('./GUILD_MEMBER_LIST_UPDATE.js')],
|
||||
['GUILD_APPLICATION_COMMANDS_UPDATE', require('./GUILD_APPLICATION_COMMANDS_UPDATE.js')],
|
||||
['GUILD_INTEGRATIONS_UPDATE', require('./GUILD_INTEGRATIONS_UPDATE')],
|
||||
['GUILD_ROLE_CREATE', require('./GUILD_ROLE_CREATE')],
|
||||
['GUILD_ROLE_DELETE', require('./GUILD_ROLE_DELETE')],
|
||||
['GUILD_ROLE_UPDATE', require('./GUILD_ROLE_UPDATE')],
|
||||
['GUILD_BAN_ADD', require('./GUILD_BAN_ADD')],
|
||||
['GUILD_BAN_REMOVE', require('./GUILD_BAN_REMOVE')],
|
||||
['GUILD_EMOJIS_UPDATE', require('./GUILD_EMOJIS_UPDATE')],
|
||||
['CHANNEL_CREATE', require('./CHANNEL_CREATE')],
|
||||
['CHANNEL_DELETE', require('./CHANNEL_DELETE')],
|
||||
['CHANNEL_UPDATE', require('./CHANNEL_UPDATE')],
|
||||
['CHANNEL_PINS_UPDATE', require('./CHANNEL_PINS_UPDATE')],
|
||||
['MESSAGE_CREATE', require('./MESSAGE_CREATE')],
|
||||
['MESSAGE_DELETE', require('./MESSAGE_DELETE')],
|
||||
['MESSAGE_UPDATE', require('./MESSAGE_UPDATE')],
|
||||
['MESSAGE_DELETE_BULK', require('./MESSAGE_DELETE_BULK')],
|
||||
['MESSAGE_REACTION_ADD', require('./MESSAGE_REACTION_ADD')],
|
||||
['MESSAGE_REACTION_REMOVE', require('./MESSAGE_REACTION_REMOVE')],
|
||||
['MESSAGE_REACTION_REMOVE_ALL', require('./MESSAGE_REACTION_REMOVE_ALL')],
|
||||
['MESSAGE_REACTION_REMOVE_EMOJI', require('./MESSAGE_REACTION_REMOVE_EMOJI')],
|
||||
['THREAD_CREATE', require('./THREAD_CREATE')],
|
||||
['THREAD_UPDATE', require('./THREAD_UPDATE')],
|
||||
['THREAD_DELETE', require('./THREAD_DELETE')],
|
||||
['THREAD_LIST_SYNC', require('./THREAD_LIST_SYNC')],
|
||||
['THREAD_MEMBER_UPDATE', require('./THREAD_MEMBER_UPDATE')],
|
||||
['THREAD_MEMBERS_UPDATE', require('./THREAD_MEMBERS_UPDATE')],
|
||||
['USER_SETTINGS_UPDATE', require('./USER_SETTINGS_UPDATE')], // Opcode 0
|
||||
// USER_SETTINGS_PROTO_UPDATE // opcode 0
|
||||
['MESSAGE_ACK', require('./MESSAGE_ACK')],
|
||||
['USER_NOTE_UPDATE', require('./USER_NOTE_UPDATE')],
|
||||
['USER_UPDATE', require('./USER_UPDATE')],
|
||||
['PRESENCE_UPDATE', require('./PRESENCE_UPDATE')],
|
||||
['TYPING_START', require('./TYPING_START')],
|
||||
['VOICE_STATE_UPDATE', require('./VOICE_STATE_UPDATE')],
|
||||
['VOICE_SERVER_UPDATE', require('./VOICE_SERVER_UPDATE')],
|
||||
['WEBHOOKS_UPDATE', require('./WEBHOOKS_UPDATE')],
|
||||
['INTERACTION_CREATE', require('./INTERACTION_CREATE')],
|
||||
['INTERACTION_SUCCESS', require('./INTERACTION_SUCCESS')],
|
||||
['INTERACTION_FAILED', require('./INTERACTION_FAILED')],
|
||||
['STAGE_INSTANCE_CREATE', require('./STAGE_INSTANCE_CREATE')],
|
||||
['STAGE_INSTANCE_UPDATE', require('./STAGE_INSTANCE_UPDATE')],
|
||||
['STAGE_INSTANCE_DELETE', require('./STAGE_INSTANCE_DELETE')],
|
||||
['GUILD_STICKERS_UPDATE', require('./GUILD_STICKERS_UPDATE')],
|
||||
['GUILD_SCHEDULED_EVENT_CREATE', require('./GUILD_SCHEDULED_EVENT_CREATE')],
|
||||
['GUILD_SCHEDULED_EVENT_UPDATE', require('./GUILD_SCHEDULED_EVENT_UPDATE')],
|
||||
['GUILD_SCHEDULED_EVENT_DELETE', require('./GUILD_SCHEDULED_EVENT_DELETE')],
|
||||
['GUILD_SCHEDULED_EVENT_USER_ADD', require('./GUILD_SCHEDULED_EVENT_USER_ADD')],
|
||||
['GUILD_SCHEDULED_EVENT_USER_REMOVE', require('./GUILD_SCHEDULED_EVENT_USER_REMOVE')],
|
||||
]);
|
||||
|
||||
module.exports = handlers;
|
||||
|
Reference in New Issue
Block a user