Tsuni
Tsuni
DIAdiscord.js - Imagine an app
Created by Tsuni on 7/29/2024 in #djs-questions
Get icon of current game from Member object
Hello! I've been working on a project that uses Discord.js to grab the current activity of a Guild Member and display it as an SVG. I've got Custom Statuses and Rich Presence working, but I don't know how to get a URL to the icon of a non-Rich Presence application like Baldur's Gate 3. This is the Activity object associated with it:
Activity {
name: "Baldur's Gate 3",
type: 0,
url: null,
details: null,
state: null,
applicationId: '1137125502985961543',
timestamps: { start: 2024-07-28T23:36:20.761Z, end: null },
party: null,
syncId: null,
assets: null,
flags: ActivityFlagsBitField { bitfield: 0 },
emoji: null,
buttons: [],
createdTimestamp: 1722209793336
}
Activity {
name: "Baldur's Gate 3",
type: 0,
url: null,
details: null,
state: null,
applicationId: '1137125502985961543',
timestamps: { start: 2024-07-28T23:36:20.761Z, end: null },
party: null,
syncId: null,
assets: null,
flags: ActivityFlagsBitField { bitfield: 0 },
emoji: null,
buttons: [],
createdTimestamp: 1722209793336
}
My understanding based on this discussion is that Discord maintains a list of detectable games with associated icon IDs. The URL they reference (https://discord.com/api/v9/applications/detectable) doesn't appear to contain icon data, though because it contains entries for relatively recent games I'm sure it's being updated. Am I overlooking something, is there another solution, or is this just no longer possible?
9 replies