Bot status
So I am currently scripting a discord bot using node.js but I cannot figure out how to make a bot status similar to this
I would really appreciate if anyone can tell me how to do this. Thanks!
client.on('ready', () => {
client.user.setPresence({ game: { name: 'with discord.js' }, status: 'idle' })
console.log(${client.user.username} is up and running!
);
})
bot.on('ready', () => { bot.user.setPresence({ WATCHING: { name: '!help' }, status: 'online' }); console.log(`[READY] ${bot.user.tag} has been successfully booted up!`); });
The bot was able to start up but the status didn't show on the bot. Can you help with that?
game
is no longer supported.game is still supported i think
it says bot name is not defined
client.on("ready", () => {
// This event will run if the bot starts, and logs in, successfully.
console.log(Bot has started, with ${client.users.cache.size} users, in ${client.channels.cache.size} channels of ${client.guilds.cache.size} guilds.
);
// Example of changing the bot's playing game to something useful. client.user
is what the
// docs refer to as the "ClientUser".
client.user.setActivity(Serving ${client.guilds.cache.size} servers
);
});
/help
const discord = require("discord.js");
const client = new discord.Client()
const { prefix, ServerID } = require("./config.json")
const config = require('./config.json');
client.on("ready", () => {
console.log("Bot online") client.user.setActivity("?help", {type: 'WATCHING' }).catch(console.error); });
you can use this piece of code here.
In the last line you can put whatever status you want.