get users
This commit is contained in:
parent
c715084a32
commit
caf3b744e2
18
index.js
18
index.js
@ -113,8 +113,8 @@ client.addListener('registered', () => {
|
|||||||
console.log("Arguments required");
|
console.log("Arguments required");
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if (!settings.channels.includes(args)) {
|
if (!settings.client.chans.includes(args)) {
|
||||||
console.log(`That channel '${args}' is not on the config!`);
|
console.log(`You're not in that channel!`);
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
currentChannel = args;
|
currentChannel = args;
|
||||||
@ -123,6 +123,20 @@ client.addListener('registered', () => {
|
|||||||
case "get_current_channel":
|
case "get_current_channel":
|
||||||
console.log(currentChannel)
|
console.log(currentChannel)
|
||||||
break
|
break
|
||||||
|
case "get_users":
|
||||||
|
let channel = currentChannel
|
||||||
|
if(args){
|
||||||
|
if (!settings.channels.includes(args)){
|
||||||
|
console.log("You're not in that channel!")
|
||||||
|
break
|
||||||
|
}
|
||||||
|
channel = args
|
||||||
|
}
|
||||||
|
console.log(client.chans[channel])
|
||||||
|
for (user in client.chans[channel].users){
|
||||||
|
console.log(user)
|
||||||
|
}
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
sendMessage(currentChannel, command)
|
sendMessage(currentChannel, command)
|
||||||
|
Loading…
Reference in New Issue
Block a user