mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Add a backwards-compatible getter for the first voice connection, thanks @qeled
This commit is contained in:
@@ -385,6 +385,9 @@ var InternalClient = (function () {
|
||||
});
|
||||
};
|
||||
|
||||
// Backwards-compatible utility getter method for the first voice connection
|
||||
// Thanks to #q (@qeled) for suggesting this
|
||||
|
||||
// def forceFetchUsers
|
||||
|
||||
InternalClient.prototype.forceFetchUsers = function forceFetchUsers() {
|
||||
@@ -1670,7 +1673,7 @@ var InternalClient = (function () {
|
||||
self.servers.add(server);
|
||||
client.emit("serverCreated", server);
|
||||
if (server.large && server.members.length < server.memberCount) {
|
||||
self.sendWS({op: 8, d: {guild_id: server.id, query: "", limit: 0}});
|
||||
self.sendWS({ op: 8, d: { guild_id: server.id, query: "", limit: 0 } });
|
||||
}
|
||||
} else {
|
||||
client.emit("warn", "server was unavailable, could not create");
|
||||
@@ -2210,6 +2213,11 @@ var InternalClient = (function () {
|
||||
get: function get() {
|
||||
return this.userAgentInfo;
|
||||
}
|
||||
}, {
|
||||
key: "voiceConnection",
|
||||
get: function get() {
|
||||
return this.voiceConnections[0];
|
||||
}
|
||||
}]);
|
||||
|
||||
return InternalClient;
|
||||
|
||||
Reference in New Issue
Block a user