I’m working on a Discord bot and I want to set its status to show it’s playing a game. Here’s what I’ve tried:
client.on('ready', () => {
console.log('Bot is up and running!');
client.user.setActivity('MyAwesomeGame');
});
This works, but it only shows the game name without an icon. I’ve seen other bots with cool game icons next to their status. Is there a way to add a custom icon or at least get the default game icon to show up?
I found some old tutorials that use client.user.setGame() instead of setActivity(), but those seem outdated. Any ideas on how to get this working with the current Discord.js version? Thanks for any help!
As someone who’s developed a few Discord bots, I can confirm that setting custom game icons for bot statuses isn’t possible due to Discord’s restrictions. It’s a bit frustrating, but there’s a workaround I’ve used that might help you out.
Instead of trying to set a custom game, you could use Rich Presence to create a more detailed status. With Rich Presence, you can add small images, large images, and even buttons to your bot’s status. It’s a bit more complex to set up, but it gives you way more control over how your bot’s status looks.
Here’s a basic example of how you might set it up:
Of course, you’ll need to upload the images to your Discord application first and use the correct asset keys. It’s not exactly the same as a custom game icon, but it can look even better if done right.
I’ve encountered this limitation as well. Unfortunately, Discord restricts custom game icons for bot statuses to officially recognized games. This is likely to prevent impersonation or misuse. Your current approach using setActivity() is correct for modern Discord.js versions. If you want an icon to appear, you’d need to use the name of an existing game in Discord’s database. Alternatively, you could explore other status options like LISTENING or WATCHING, which might better suit your bot’s purpose without relying on game icons.
hey sparklinggem, i’ve been in a similar situation. unfortunately, discord doesn’t allow custom icons for bot statuses.
you can only see icons for well-known games. so, you’re stuck with the system-provided ones if the game is in their database. sucks, but it’s the way it works.