Closed KriskotooBG closed 5 years ago
Use those docs: (link goes to bot.editChannelInfo which will let you change the text channel name) https://izy521.github.io/discord.io-docs/Discord.Client.html#editChannelInfo
bot.getOfflineUsers doesn't exist, try bot.getAllUsers() instead (although you shouldnt need to do it unless you are in a very big server)
number of members is already cached in your bot - Object.keys(bot.servers[serverID].members).length or bot.servers[serverID].member_count
works like a charm! i guess i was reading the old docs on gitbooks haha... Thanks!
Note about getAllUsers:
getAllUsers does not take a callback. Instead, it emits the allUsers
event.
You should execute bot.getAllUsers()
only once, inside the bot.on("ready"
function. Then, you should move everything else from the bot.on("ready"
function to bot.on("allUsers"
.
Hi, Recently I wanted to make the bot get the count of users and display it as a channel name after reading the documentation I found out about the client.getOfflineUsers() unfortunately when I tried to use it, my bot crashed every time with the error "client.getOfflineUsers(callback) is not a function" also I didn't see a method that allows you to rename a text channel. Any help is appreciated!