get users

This commit is contained in:
simio 2024-12-01 01:06:15 -03:00
parent c715084a32
commit caf3b744e2

View File

@ -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)