gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
how can i make my bot on discord.js have a custom status?
- User
how can i make my bot on discord.js have a custom status?
- Assistant
To make your bot on Discord.js have a custom status, you can use the
client.user.setPresence()method. Here's an example code snippet that demonstrates how to set a custom status for your bot:javascriptconst Discord = require('discord.js'); const client = new Discord.Client(); client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); // Set custom status client.user.setPresence({ activity: { name: 'Custom status message', type: 'PLAYING' // You can choose from 'PLAYING', 'STREAMING', 'LISTENING' or 'WATCHING' }, status: 'online' // You can choose from 'online', 'idle', 'dnd', or 'invisible' }); }); client.login('YOUR_DISCORD_BOT_TOKEN');Replace
'Custom status message'with the desired status message you want to display. You can also change thetypeto 'STREAMING', 'LISTENING' or 'WATCHING' if needed.Make sure to replace
'YOUR_DISCORD_BOT_TOKEN'with the actual token of your Discord bot.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.