gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
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 set a custom status for your Discord bot using discord.js, you can use the
client.user.setPresence()method. Here's an example of how to achieve this:const Discord = require('discord.js'); const client = new Discord.Client(); // Bot login and ready event client.on('ready', () => { console.log(`Logged in as ${client.user.tag}!`); // Set custom status client.user.setPresence({ activity: { name: 'your custom status here' }, status: 'online', // You can change to 'idle', 'dnd' or 'invisible' }) .catch(console.error); }); client.login('YOUR_BOT_TOKEN');Replace
'your custom status here'with the desired status you want to set. It can be any string you want to display.Ensure you replace
'YOUR_BOT_TOKEN'with the bot token generated from the Discord Developer Portal.Once you run the code, your bot should have a custom status set to the provided text.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.