Rich presence

I'm trying to use the rich presence of my bot, however, when I use client.user.setActivity and pass the activity parameter, the images don't work, the texts work, however, when I change the name parameter to the name of my bot and I use "512x512pngimages" in the large_image parameter. I can use my bot's icon in rich presence, but I cannot use custom images that I uploaded to the art assets page on the developer portal
33 Replies
d.js toolkit
d.js toolkitβ€’3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - βœ… Marked as resolved by OP
NyR
NyRβ€’3mo ago
Bot's can't have rich presence
Bibis" ⁡⁴ 🐬
but this is precisely the point, it is possible
Bibis" ⁡⁴ 🐬
this bot belongs to my friend
monbrey
monbreyβ€’3mo ago
But it isnt, your friend is doing something dodgy Rich presence is not done via setActivity, its a local protocol
Bibis" ⁡⁴ 🐬
How can it be doubtful if it is a function of discord.js itself?
monbrey
monbreyβ€’3mo ago
It is not a function of discord.js
Bibis" ⁡⁴ 🐬
client.once('ready', async () => {
console.log('Bot estΓ‘ online!');

client.user.setPresence({
activities: [{
name: 'AQUI SE COLOCA O NOME IGUAL DO BOT',
type: ActivityType.Playing,
assets: {
large_image: '512x512pngimages', // aqui vocΓͺ nΓ£o mexe
large_text: 'Visite skmods.com.br!' // Texto ao passar o mouse sobre a imagem
}
}],
status: 'online'
});
client.once('ready', async () => {
console.log('Bot estΓ‘ online!');

client.user.setPresence({
activities: [{
name: 'AQUI SE COLOCA O NOME IGUAL DO BOT',
type: ActivityType.Playing,
assets: {
large_image: '512x512pngimages', // aqui vocΓͺ nΓ£o mexe
large_text: 'Visite skmods.com.br!' // Texto ao passar o mouse sobre a imagem
}
}],
status: 'online'
});
monbrey
monbreyβ€’3mo ago
If your friend has achieved it why not ask them how?
Bibis" ⁡⁴ 🐬
He also wants to know how to place custom images, we can only place the icon of the bot or a server
monbrey
monbreyβ€’3mo ago
Discord Developer Portal
Discord Developer Portal β€” API Docs for Bots and Developers
Integrate your service with Discord β€” whether it's a bot or a game or whatever your wildest imagination can come up with.
monbrey
monbreyβ€’3mo ago
Its simply not discord.js functionality
Bibis" ⁡⁴ 🐬
When I opened the ticket I was wrong, we used the .setPresence function
monbrey
monbreyβ€’3mo ago
Details are here from Discord Its the same thing, it still doesnt support it over the gateway
Bibis" ⁡⁴ 🐬
I swear to you that I'm using discord.js, at the moment I'm not on my computer but as soon as I log in I'll show you Can I send you a friend request to remember you when I log on to the computer? Ok Sorry if I say something wrong, I'm Brazilian and my English isn't good
JackSkelt
JackSkeltβ€’3mo ago
Actually you can set a "custom image" for the presence of your bot But isn't rich presence
JackSkelt
JackSkeltβ€’3mo ago
I made a lot of tests using the gateway connection, isn't the way that she thought, because you can't set other properties that isn't for bot presence
No description
JackSkelt
JackSkeltβ€’3mo ago
The way that this works is using the name and image from the application that owns the bot. You just need to set the name of the activity to the name of the application
No description
JackSkelt
JackSkeltβ€’3mo ago
And the picture of the application will display as the large image from the presence, but you can't set the text for that image
No description
JackSkelt
JackSkeltβ€’3mo ago
Isn't something "dodgy", it's something from Discord itself
Bibis" ⁡⁴ 🐬
did you see? I was right and you are accusing me of doing something suspicious
NyR
NyRβ€’3mo ago
Well I can reporoduce, but again all this is undocumented, and we do not support undocumented stuff.
JackSkelt
JackSkeltβ€’3mo ago
Isn't related to discord.js
NyR
NyRβ€’3mo ago
Also by the looks of it, this behavior is only reproducible when you put the application name as name so initial point still stands, bot's can't have rich presence, well except in this scenario ig
JackSkelt
JackSkeltβ€’3mo ago
Also, the other properties from presence don't work for bots, like timestamps, assets, etc
NyR
NyRβ€’3mo ago
Also not exactly rich presence if you ask me tbh, it just adding the Image part of the application, rest don't work anyway
NyR
NyRβ€’3mo ago
I meant discord's documentation, not discord.js's
Unknown User
Unknown Userβ€’3mo ago
Message Not Public
Sign In & Join Server To View
JackSkelt
JackSkeltβ€’3mo ago
I already explain, no need to say that
Bibis" ⁡⁴ 🐬
In fact, you are not friendly at all, I just wanted to know if it was possible to put a personalized image and you already said that I use a fork of discord.js or that we were doing something suspicious
Want results from more Discord servers?
Add your server