Libraryless. Click here for Pure Java version (2212L/14K).
1 | svoid gazelle_discord_playingGame(S gameName) { |
2 | O presence = gazelle_discordPresence(); |
3 | // JDA 3.8 |
4 | virtual Game game = call(getClass_vmName(gazelle_jda(), "net.dv8tion.jda.core.entities.Game"), 'playing, gameName); |
5 | if (game != null) |
6 | call(presence, 'setGame, game); |
7 | else { |
8 | // JDA 4 |
9 | virtual Activity activity = call(getClass_vmName(gazelle_jda(), "net.dv8tion.jda.api.entities.Activity"), 'playing, gameName); |
10 | call(presence, 'setActivity, activity); |
11 | } |
12 | } |
Began life as a copy of #1023456
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1023457 |
Snippet name: | gazelle_discord_playingGame |
Eternal ID of this version: | #1023457/9 |
Text MD5: | ec6bfeb769b0c97f630eb2a12040dd9a |
Transpilation MD5: | e730cbdf470ee8d9dcf66d2f971b7430 |
Author: | stefan |
Category: | javax / discord |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-11 22:41:21 |
Source code size: | 490 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 367 / 533 |
Version history: | 8 change(s) |
Referenced in: | [show references] |