mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-07-18 16:32:17 -05:00
Show images for unknown titles and add Nintendo eShop link in Discord
This commit is contained in:
parent
d750ed5a1f
commit
78e502bca2
|
|
@ -4,7 +4,6 @@ export const defaultTitle: Title = {
|
|||
id: '0000000000000000',
|
||||
client: '950883021165330493',
|
||||
titleName: true,
|
||||
largeImageKey: 'nintendoswitch',
|
||||
};
|
||||
|
||||
const titles: Title[] = [
|
||||
|
|
|
|||
10
src/util.ts
10
src/util.ts
|
|
@ -115,9 +115,15 @@ export function getDiscordPresence(game: Game, friendcode?: CurrentUser['links']
|
|||
presence: {
|
||||
details: text[0],
|
||||
state: text[1],
|
||||
largeImageKey: title.largeImageKey,
|
||||
largeImageText: friendcode && title.largeImageKey ? 'SW-' + friendcode.id : undefined,
|
||||
largeImageKey: title.largeImageKey ?? game.imageUri,
|
||||
largeImageText: friendcode ? 'SW-' + friendcode.id : undefined,
|
||||
smallImageKey: title.smallImageKey,
|
||||
buttons: game.shopUri ? [
|
||||
{
|
||||
label: 'Nintendo eShop',
|
||||
url: game.shopUri,
|
||||
},
|
||||
] : [],
|
||||
},
|
||||
showTimestamp: title.showTimestamp,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user