Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

how can i make my bot on discord.js have a custom status?

  1. User

    how can i make my bot on discord.js have a custom status?

  2. Assistant

    To make your bot on Discord.js have a custom status, you can use the presence property of the Client class. Here's an example of how you can set a custom status for your bot:

    const Discord = require('discord.js');
    const client = new Discord.Client();
    
    client.on('ready', () => {
      // Set the bot's custom status
      client.user.setPresence({
        activity: { name: 'your custom status here' },
        status: 'online',
      })
        .then(console.log)
        .catch(console.error);
    });
    
    client.login('YOUR_BOT_TOKEN');
    

    In the above code, replace 'YOUR_BOT_TOKEN' with your actual bot token. And in place of 'your custom status here', you can set whatever custom status you want for your bot.

    Remember, the bot token is sensitive information, so make sure to keep it secure and not share it with others.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.