How can I add a custom icon to my Discord bot's activity?

I recently built a Discord bot and set it to display a ‘playing a game’ status. Here’s the code I’m using:

bot.on('ready', () => {
    console.log('Bot is online!');
    bot.user.setActivity('osu!');
});

Currently, it shows the game name but only with a question mark icon instead of the game icon itself. I’ve watched various tutorials where they used an older method with bot.user.setGame(' '), and it allowed them to display an icon correctly.

Is there a way to add a specific icon of my choice, or is it limited to the generic interrogation mark?

The icon displayed when your bot sets activity to ‘osu!’ is determined by Discord’s internal database of recognized applications. If Discord recognizes the game, it will show the official icon; otherwise, it defaults to a question mark. Verify the spelling and capitalization, as even minor differences can prevent the correct icon from appearing. Unfortunately, it is not possible to upload custom icons using the bot API, as Discord exclusively manages icon selection based on their app registry.

I hit this same issue when setting up my bot’s status a few months ago. The question mark shows up because Discord’s Rich Presence only displays proper icons for apps that are officially registered in their database. What worked for me was trying different variations of the game name - sometimes “osu!” works, other times “osu” without the exclamation mark gets recognized. You could also try using the exact name that shows up in Discord’s game detection when you actually play it. Your setActivity method is fine, but the icon display depends entirely on Discord’s internal recognition system. Unfortunately there’s no way to force custom icons through the bot API.

yea, discord has its own icons, and u can’t use custom ones. that ‘?’ icon just means it doesn’t recognize the game. u could try setActivity('osu!', { type: 'PLAYING' }), but it won’t change the icon.