Rename voiceconnection.speaking to voiceconnection.memberd

This commit is contained in:
Amish Shah
2015-12-26 18:05:31 +00:00
parent 0113202c2f
commit 3b7c5aa96a
6 changed files with 11 additions and 11 deletions

View File

@@ -13,7 +13,7 @@ A voice channel of a server. Currently, the voice channel class has no differenc
Attributes Attributes
---------- ----------
speaking members
~~~~~~~~ ~~~~~~~~
A Cache_ of Users_ that are speaking in the voice channel A Cache_ of Users_ that are connected to the voice channel

View File

@@ -181,7 +181,7 @@ var Server = (function (_Equality) {
// removes from other speaking channels first // removes from other speaking channels first
this.eventStopSpeaking(user); this.eventStopSpeaking(user);
channel.speaking.add(user); channel.members.add(user);
user.voiceChannel = channel; user.voiceChannel = channel;
return true; return true;
} else { } else {
@@ -205,8 +205,8 @@ var Server = (function (_Equality) {
var chan = _ref3; var chan = _ref3;
if (chan.speaking.has(user)) { if (chan.members.has(user)) {
chan.speaking.remove(user); chan.members.remove(user);
user.voiceChannel = null; user.voiceChannel = null;
return chan; return chan;
} }

View File

@@ -25,7 +25,7 @@ var VoiceChannel = (function (_ServerChannel) {
_classCallCheck(this, VoiceChannel); _classCallCheck(this, VoiceChannel);
_ServerChannel.call(this, data, client, server); _ServerChannel.call(this, data, client, server);
this.speaking = new _UtilCache2["default"](); this.members = new _UtilCache2["default"]();
} }
VoiceChannel.prototype.join = function join() { VoiceChannel.prototype.join = function join() {

View File

@@ -149,7 +149,7 @@ export default class Server extends Equality {
// removes from other speaking channels first // removes from other speaking channels first
this.eventStopSpeaking(user); this.eventStopSpeaking(user);
channel.speaking.add(user); channel.members.add(user);
user.voiceChannel = channel; user.voiceChannel = channel;
return true; return true;
}else{ }else{
@@ -160,8 +160,8 @@ export default class Server extends Equality {
eventStopSpeaking(user){ eventStopSpeaking(user){
for(let chan of this.channels.getAll("type", "voice")){ for(let chan of this.channels.getAll("type", "voice")){
if(chan.speaking.has(user)){ if(chan.members.has(user)){
chan.speaking.remove(user); chan.members.remove(user);
user.voiceChannel = null; user.voiceChannel = null;
return chan; return chan;
} }

View File

@@ -7,7 +7,7 @@ import {reg} from "../Util/ArgumentRegulariser";
export default class VoiceChannel extends ServerChannel{ export default class VoiceChannel extends ServerChannel{
constructor(data, client, server){ constructor(data, client, server){
super(data, client, server); super(data, client, server);
this.speaking = new Cache(); this.members = new Cache();
} }
join(callback = function () { }) { join(callback = function () { }) {

View File

@@ -44,7 +44,7 @@ client.on("message", msg => {
if (msg.content === "who is speaking") { if (msg.content === "who is speaking") {
for (var chan of msg.channel.server.channels.getAll("type", "voice")) { for (var chan of msg.channel.server.channels.getAll("type", "voice")) {
msg.channel.send(`${chan} : ${chan.speaking}`); msg.channel.send(`${chan} : ${chan.members}`);
} }
} }