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");
|
||||
break
|
||||
}
|
||||
if (!settings.channels.includes(args)) {
|
||||
console.log(`That channel '${args}' is not on the config!`);
|
||||
if (!settings.client.chans.includes(args)) {
|
||||
console.log(`You're not in that channel!`);
|
||||
break
|
||||
}
|
||||
currentChannel = args;
|
||||
@ -123,6 +123,20 @@ client.addListener('registered', () => {
|
||||
case "get_current_channel":
|
||||
console.log(currentChannel)
|
||||
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{
|
||||
sendMessage(currentChannel, command)
|
||||
|
Loading…
Reference in New Issue
Block a user