mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
refactor: remove all voice code (#5818)
* refactor: remove all voice code * refactor: remove even more remnants
This commit is contained in:
@@ -25,7 +25,6 @@ module.exports = {
|
||||
MessageFlags: require('./util/MessageFlags'),
|
||||
Intents: require('./util/Intents'),
|
||||
Permissions: require('./util/Permissions'),
|
||||
Speaking: require('./util/Speaking'),
|
||||
SnowflakeUtil: require('./util/SnowflakeUtil'),
|
||||
Structures: require('./util/Structures'),
|
||||
SystemChannelFlags: require('./util/SystemChannelFlags'),
|
||||
|
||||
@@ -385,7 +385,6 @@ class GuildMember extends Base {
|
||||
guild: 'guildID',
|
||||
user: 'userID',
|
||||
displayName: true,
|
||||
speaking: false,
|
||||
lastMessage: false,
|
||||
lastMessageID: false,
|
||||
roles: true,
|
||||
|
||||
@@ -203,23 +203,6 @@ exports.Status = {
|
||||
RESUMING: 8,
|
||||
};
|
||||
|
||||
/**
|
||||
* The current status of a voice connection. Here are the available statuses:
|
||||
* * CONNECTED: 0
|
||||
* * CONNECTING: 1
|
||||
* * AUTHENTICATING: 2
|
||||
* * RECONNECTING: 3
|
||||
* * DISCONNECTED: 4
|
||||
* @typedef {number} VoiceStatus
|
||||
*/
|
||||
exports.VoiceStatus = {
|
||||
CONNECTED: 0,
|
||||
CONNECTING: 1,
|
||||
AUTHENTICATING: 2,
|
||||
RECONNECTING: 3,
|
||||
DISCONNECTED: 4,
|
||||
};
|
||||
|
||||
exports.OPCodes = {
|
||||
DISPATCH: 0,
|
||||
HEARTBEAT: 1,
|
||||
@@ -235,18 +218,6 @@ exports.OPCodes = {
|
||||
HEARTBEAT_ACK: 11,
|
||||
};
|
||||
|
||||
exports.VoiceOPCodes = {
|
||||
IDENTIFY: 0,
|
||||
SELECT_PROTOCOL: 1,
|
||||
READY: 2,
|
||||
HEARTBEAT: 3,
|
||||
SESSION_DESCRIPTION: 4,
|
||||
SPEAKING: 5,
|
||||
HELLO: 8,
|
||||
CLIENT_CONNECT: 12,
|
||||
CLIENT_DISCONNECT: 13,
|
||||
};
|
||||
|
||||
exports.Events = {
|
||||
RATE_LIMIT: 'rateLimit',
|
||||
INVALID_REQUEST_WARNING: 'invalidRequestWarning',
|
||||
@@ -262,7 +233,6 @@ exports.Events = {
|
||||
GUILD_MEMBER_REMOVE: 'guildMemberRemove',
|
||||
GUILD_MEMBER_UPDATE: 'guildMemberUpdate',
|
||||
GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable',
|
||||
GUILD_MEMBER_SPEAKING: 'guildMemberSpeaking',
|
||||
GUILD_MEMBERS_CHUNK: 'guildMembersChunk',
|
||||
GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate',
|
||||
GUILD_ROLE_CREATE: 'roleCreate',
|
||||
@@ -291,8 +261,6 @@ exports.Events = {
|
||||
PRESENCE_UPDATE: 'presenceUpdate',
|
||||
VOICE_SERVER_UPDATE: 'voiceServerUpdate',
|
||||
VOICE_STATE_UPDATE: 'voiceStateUpdate',
|
||||
VOICE_BROADCAST_SUBSCRIBE: 'subscribe',
|
||||
VOICE_BROADCAST_UNSUBSCRIBE: 'unsubscribe',
|
||||
TYPING_START: 'typingStart',
|
||||
WEBHOOKS_UPDATE: 'webhookUpdate',
|
||||
INTERACTION_CREATE: 'interaction',
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const BitField = require('./BitField');
|
||||
|
||||
/**
|
||||
* Data structure that makes it easy to interact with a {@link VoiceConnection#speaking}
|
||||
* and {@link guildMemberSpeaking} event bitfields.
|
||||
* @extends {BitField}
|
||||
*/
|
||||
class Speaking extends BitField {}
|
||||
|
||||
/**
|
||||
* @name Speaking
|
||||
* @kind constructor
|
||||
* @memberof Speaking
|
||||
* @param {BitFieldResolvable} [bits=0] Bit(s) to read from
|
||||
*/
|
||||
|
||||
/**
|
||||
* Bitfield of the packed bits
|
||||
* @type {number}
|
||||
* @name Speaking#bitfield
|
||||
*/
|
||||
|
||||
/**
|
||||
* Numeric speaking flags. All available properties:
|
||||
* * `SPEAKING`
|
||||
* * `SOUNDSHARE`
|
||||
* * `PRIORITY_SPEAKING`
|
||||
* @type {Object}
|
||||
* @see {@link https://discord.com/developers/docs/topics/voice-connections#speaking}
|
||||
*/
|
||||
Speaking.FLAGS = {
|
||||
SPEAKING: 1 << 0,
|
||||
SOUNDSHARE: 1 << 1,
|
||||
PRIORITY_SPEAKING: 1 << 2,
|
||||
};
|
||||
|
||||
module.exports = Speaking;
|
||||
Reference in New Issue
Block a user