hello by bot.js does not respond.

hello by bot.js does not respond.

1 Like

May I know what is the error inside the console. Furthermore, Java isn’t supported by Glitch yet.

(node:2002) DeprecationWarning: Collection#find: pass a function instead

8:40 PM

1 Like

(node:2039) DeprecationWarning: ClientUser#setGame: use ClientUser#setActivity instead

8:46 PM i am turkish

1 Like

ClientUser.setGame has been deprecated. Use setActivity or setPresence instead.

Client.user.setActivity('with Glitch', { type: 'WATCHING' }).then(console.log).catch(console.error);

Furthermore, Collection.find requires a function now, and it no longer accepts a property.

Collection.find(user => user.name === 'Name of the user');

My problem is that it does not write, but does not write

client.on(‘ready’, () => {
console.log(‘Im ready!’);
client.user.setPresence({
status: “online”,
game: {
name: “!help”,
type: “PLAYING”
}
});
});

bot.on(“ready”, async () =>{
console.log(${bot.user.username} is online It's running on ${bot.guilds.size} servers!);
bot.user.setActivity(${bot.guilds.size} servers - !help, {type: “WATCHING”});
})

that’s is what I did to set the activity it will post the sever count along with the help command. and sets it to watching, you will also be told the bots username is and the amount of servers the bot is on in the logs