M
MudletBraska/Xinefus

Discord Rich Text Prescence?

yeah, still working on this. I have been able to get Game using a custom Discord server. Invite URL: in the debug log. Then when I check the gmcp log it show:
{
External = {
Discord = {
Info = {
applicationid = "**bot-id**",
inviteurl = "**discordinvite**"
},
Status = {
details = "Playing a Game",
game = "Dragonball Redemption",
smallimagekey = "small1-icon",
smallimagetext = "some small text",
state = "Grinding"
}
}
}
}
{
External = {
Discord = {
Info = {
applicationid = "**bot-id**",
inviteurl = "**discordinvite**"
},
Status = {
details = "Playing a Game",
game = "Dragonball Redemption",
smallimagekey = "small1-icon",
smallimagetext = "some small text",
state = "Grinding"
}
}
}
}
but nothing happens. I have tried to follow https://wiki.mudlet.org/w/Manual:Scripting#Discord_Rich_Presence and https://wiki.mudlet.org/w/Standards:Discord_GMCP#External.Discord.Status, which I think is sending the correct items, but how do I make the client do anything? In the extra notes it says to ensure to enable gmcp Core.Supports.Add ["External.Discord 1"] this is client side I assume?
B
Braska/Xinefus678d ago
Anyone willing to help would be appreciated. @karahd any chance you could help? Have you got rich text presence working?
UU
Unknown User678d ago
B
Braska/Xinefus678d ago
hence why i msg'd you 😉 Thanks, I will see wtf I gone done wrong. 😐 seems it's pushing the same as you, least the json looks the same.
V
Vadi678d ago
what are the game connection details?
B
Braska/Xinefus678d ago
I don't have it enabled for all players yet. I just have an admin function that runs the external.discord.status
V
Vadi678d ago
does discord even work for you and it doesnt say this?
B
Braska/Xinefus678d ago
it works. 🙂 but yeah, not sure why it doesn't do anytyhing.
B
Braska/Xinefus678d ago
B
Braska/Xinefus678d ago
lua display(gmcp) shows:
{
External = {
Discord = {
Info = {
applicationid = "ID",
inviteurl = "URL"
},
Status = {
details = "Get Some!",
game = "Dragonball Redemption"
}
}
}
}
{
External = {
Discord = {
Info = {
applicationid = "ID",
inviteurl = "URL"
},
Status = {
details = "Get Some!",
game = "Dragonball Redemption"
}
}
}
}
but i'm not sure how the bot-id interacts with things. What permissions perhaps?
V
Vadi678d ago
bot id?
V
Vadi678d ago
Mudlet
File:Mudlet Discord ApplicationID.png
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
B
Braska/Xinefus678d ago
app id. hmm, maybe there is where I am going wrong. nope, that's the ID i'm using. 😦 so... is it a linux thing? Will it not recognize because I'm playing on a linux box? like.. it's just me personally? 😛
V
Vadi678d ago
it was developed on linux - works fine in fact I see it for you now
B
Braska/Xinefus678d ago
well, i had to manually add that.. I was looking to make sure it was enabled on settings.. then just selected the mudlet appimage.. so I cheated does it have something to do with the client-id and OAuth2 permissions? I have a bot tied to this... does the bot need special permissions? my bot does mud-discord chat, which still works. so I'm a bit unsure if there is something missing.
V
Vadi678d ago
I don't think it would be permission related
B
Braska/Xinefus678d ago
k. I'm not sure then. 😦
V
Vadi678d ago
not sure either - there's only so much we can guess. I suggest giving your client id and a way to connect to the game to test
B
Braska/Xinefus678d ago
I will enable it game wide. and share details for login. I feel like it could just be me, lol.
S
SlySven ☕678d ago
All we need to test is, I think, your Discord "Application" ID (it is typically an 18 digit number) which is needed to get the first line in the RP message to say "Playing <Application>" and to access the icons for YOUR game...
B
Braska/Xinefus678d ago
mud.dbredemption.com 7000. I haven't added an image. i mean I have a cover image in the app. but I haven't done any image updates through gmcp. AppID: 779015653599215616
S
SlySven ☕678d ago
Our/Discords recommendation is a 1024x1024 .PNG and we recommend you upload/call it server-icon...
B
Braska/Xinefus678d ago
B
Braska/Xinefus678d ago
It's there.
S
SlySven ☕678d ago
Ok, gimme a couple of minutes to spin up Qt Creator and build the current development code...
B
Braska/Xinefus678d ago
lol.
S
SlySven ☕678d ago
Well the Application ID works - not sure about the Application's NAME though...
B
Braska/Xinefus678d ago
ok, it needs a specific name?
S
SlySven ☕678d ago
And the switching between Games (MUDs) still works... 😌
B
Braska/Xinefus678d ago
does the name need to be something specific?
S
SlySven ☕678d ago
Nope - and I noticed you just changed it...! 😀
B
Braska/Xinefus678d ago
yeah, simplified. how is it working for you and not me 😦
S
SlySven ☕678d ago
It just makes sense to be something that can be put after "Playing " ...
B
Braska/Xinefus678d ago
it's like it's not updating my status..
S
SlySven ☕678d ago
I'm entering the Application ID into the profile on the command line with - in your case - lua setDiscordApplicationID("779015653599215616")
B
Braska/Xinefus678d ago
I get ture true
S
SlySven ☕678d ago
Yeah that means the lua command worked...
B
Braska/Xinefus678d ago
so my mudlet isn't talking to my discord?
S
SlySven ☕678d ago
Lets check your settings...
B
Braska/Xinefus678d ago
but I can click on all the fancy icons and get to my server and this server.
B
Braska/Xinefus678d ago
This I mean.
S
SlySven ☕678d ago
That's totally separate...
B
Braska/Xinefus678d ago
ok.
S
SlySven ☕678d ago
What OS are you using?
B
Braska/Xinefus678d ago
I'm all ready to listen,.
B
Braska/Xinefus678d ago
S
SlySven ☕678d ago
And you are using a Release version of Mudlet you installed?
B
Braska/Xinefus678d ago
B
Braska/Xinefus678d ago
I think that would be more accurate, the about mudlet. I'm running from an appimage I downloaded. lol your statuses make me laugh
S
SlySven ☕678d ago
Right, the options in the "Chat" tab for your Discord profile are left at the defaults I take it:
B
Braska/Xinefus678d ago
yep
B
Braska/Xinefus678d ago
I'm going to have to grab my kid from his birthday party. I really appreciate the quick support. I should be back a bit later. sorry to run out.
S
SlySven ☕678d ago
And the Discord option is set in the profile's options:
S
SlySven ☕678d ago
Okay...
B
Braska/Xinefus678d ago
yes it's set.
S
SlySven ☕678d ago
🤔 Well, we'll have to dive deeper later on then... 👋
B
Braska/Xinefus678d ago
Yes ticked.
S
SlySven ☕678d ago
Ah, so do you get the (default) "Playing Mudlet" Rich Presence showing on Discord when you start Mudlet...?
B
Braska/Xinefus678d ago
I do not. :( And I think that is my problem. I may try compiling and installing Mudlet to see if that will do anything.
S
SlySven ☕678d ago
If you can get the AppImage to run from the command line one of the first lines of the debug output that Mudlet emits onto the command line is something about whether the RPC library was loaded - as I highlight here when I am running my recently complied code within Qt Creator:
B
Braska/Xinefus678d ago
I will look soon. I have successfully run it from terminal, but I don't think I've seen that line.
S
SlySven ☕678d ago
Ah, yeah - you can do that easily enough, once you have untarred the file we make available at: https://www.mudlet.org/download/ you can run it directly from the command line:
stephen@Ripley:~/src/mudlet-dev/Mudlet/mudlet$ ~/Downloads/Mudlet.AppImage
Discord integration loaded. Using functions from: "libdiscord-rpc.so"
mudlet::readEarlySettings(...) INFO - Using language code "en_GB" to switch to "English (United Kingdom)" locale.
mudlet::scanForMudletTranslations(":/lang") INFO - Seeking Mudlet translation files:
found a Mudlet translation for locale code: "de_DE".
found a Mudlet translation for locale code: "el_GR".
found a Mudlet translation for locale code: "en_GB".
found a Mudlet translation for locale code: "en_US".
found a Mudlet translation for locale code: "es_ES".
found a Mudlet translation for locale code: "fi_FI".
found a Mudlet translation for locale code: "fr_FR".
found a Mudlet translation for locale code: "it_IT".
found a Mudlet translation for locale code: "nl_NL".
found a Mudlet translation for locale code: "pl_PL".
found a Mudlet translation for locale code: "pt_BR".
found a Mudlet translation for locale code: "pt_PT".
found a Mudlet translation for locale code: "ru_RU".
found a Mudlet translation for locale code: "tr_TR".
found a Mudlet translation for locale code: "zh_CN".
found a Mudlet translation for locale code: "zh_TW".
mudlet::scanForQtTranslations("/tmp/.mount_MudletbL121Y/translations") INFO - Seeking Qt translation files:
found a Qt translation for locale code: "de_DE"
no Qt translation found for locale code: "el_GR"
found a Qt translation for locale code: "en_GB"
found a Qt translation for locale code: "en_US"
found a Qt translation for locale code: "es_ES"
found a Qt translation for locale code: "fi_FI"
stephen@Ripley:~/src/mudlet-dev/Mudlet/mudlet$ ~/Downloads/Mudlet.AppImage
Discord integration loaded. Using functions from: "libdiscord-rpc.so"
mudlet::readEarlySettings(...) INFO - Using language code "en_GB" to switch to "English (United Kingdom)" locale.
mudlet::scanForMudletTranslations(":/lang") INFO - Seeking Mudlet translation files:
found a Mudlet translation for locale code: "de_DE".
found a Mudlet translation for locale code: "el_GR".
found a Mudlet translation for locale code: "en_GB".
found a Mudlet translation for locale code: "en_US".
found a Mudlet translation for locale code: "es_ES".
found a Mudlet translation for locale code: "fi_FI".
found a Mudlet translation for locale code: "fr_FR".
found a Mudlet translation for locale code: "it_IT".
found a Mudlet translation for locale code: "nl_NL".
found a Mudlet translation for locale code: "pl_PL".
found a Mudlet translation for locale code: "pt_BR".
found a Mudlet translation for locale code: "pt_PT".
found a Mudlet translation for locale code: "ru_RU".
found a Mudlet translation for locale code: "tr_TR".
found a Mudlet translation for locale code: "zh_CN".
found a Mudlet translation for locale code: "zh_TW".
mudlet::scanForQtTranslations("/tmp/.mount_MudletbL121Y/translations") INFO - Seeking Qt translation files:
found a Qt translation for locale code: "de_DE"
no Qt translation found for locale code: "el_GR"
found a Qt translation for locale code: "en_GB"
found a Qt translation for locale code: "en_US"
found a Qt translation for locale code: "es_ES"
found a Qt translation for locale code: "fi_FI"
Mudlet
Download Mudlet | Mudlet
Play on Windows, macOS, and Linux. It's free and opensource :)
B
Braska/Xinefus678d ago
coming in and out between kids and dinner. 😛
B
Braska/Xinefus678d ago
B
Braska/Xinefus678d ago
doesn't look like it. oh wait, first line.
S
SlySven ☕678d ago
Oh, poo! Right, next question... Are you running more than one Discord application at the same time, I mean are you running more than one of these at the same time! * "Discord" (the main version, the "Release" one, the oldest of the three) * "Discord-PTB" (the "Public Test Beta" one, likely has some features/bugs/bugfixes than the main one but is newer) * "Discord-Canary" (the bleeding edge "Alpha" one, very probable has more features/bugs/bugfixes than the main one but is the bleeding edge one) Most people do NOT do this, but there have been some exceptional situations where it is useful to run more than one!
B
Braska/Xinefus678d ago
Nope.
UU
Unknown User678d ago
B
Braska/Xinefus678d ago
I just have the one instance.
S
SlySven ☕678d ago
Okay. I'm not sure what else could be going wrong. Are you in a position to build a copy of Mudlet yourself? If so there is a #DEFINE that is normally commented out in the ./src/discord.cpp file that can be un-commented (line 32 in the file) to generate debug messages that make tracking what is happening easier...
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#include "discord.h"
#include "mudlet.h"

#include "pre_guard.h"
#include <QtDebug>
#include <QHash>
#include <string.h>
#include "post_guard.h"

// Uncomment this to provide some additional qDebug() output:
// #define DEBUG_DISCORD 1

QString Discord::smUserName;
QString Discord::smUserId;
QString Discord::smDiscriminator;
QString Discord::smAvatar;
const QString Discord::mMudletApplicationId = qsl("450571881909583884");

Discord::Discord(QObject* parent)
: QObject(parent)
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

#include "discord.h"
#include "mudlet.h"

#include "pre_guard.h"
#include <QtDebug>
#include <QHash>
#include <string.h>
#include "post_guard.h"

// Uncomment this to provide some additional qDebug() output:
// #define DEBUG_DISCORD 1

QString Discord::smUserName;
QString Discord::smUserId;
QString Discord::smDiscriminator;
QString Discord::smAvatar;
const QString Discord::mMudletApplicationId = qsl("450571881909583884");

Discord::Discord(QObject* parent)
: QObject(parent)
B
Braska/Xinefus678d ago
I'll give it a try tomorrow. I really appreciate this help.
UU
Unknown User678d ago
B
Braska/Xinefus677d ago
Thanks! I'm still learning Mudlet. Heheh I don't have time to dig into this today unfortunately, however I did try to login to ThresholdRPG and it did not show up either. However, I opened up Lutris to see if that did anything and it automatically changed my status... but if I have mudlet running it doesn't seem to do anything. 😦 so is it something to do with how mudlet is talking to my pc? I'll have to dig into doing a fresh install of mudlet and discord and go from there. Happy Sunday.
S
SlySven ☕677d ago
TBH it sounds like the Mudlet + the Discord RPC library code (archived - so unchanging - at https://github.com/discord/discord-rpc) is not connecting to the Discord application... Oh, it has been un-archived - and it seems there is a small change to the "Party" details. https://github.com/discord/discord-rpc/commit/963aa9f3e5ce81a4682c6ca3d136cddda614db33 I guess @Vadi we might want to look to pull in that change to our copy of the library?
GitHub
[Maintenance PR for Legacy Gamedevs] Add party privacy enum (#306) ...
* Add party privacy enum * Add party privacy enum * Possible unreal working * Cast to int
V
Vadi677d ago
Let's see if someone asks for it first I haven't yet seen anyone implement parties yet..
S
SlySven ☕677d ago
You haven't been checking my RP - I've been mis-using it for a while now...
S
SlySven ☕677d ago
A
atari2600tim676d ago
I think Mudlet lets you say that you are in a party with 3 of 5 slots taken, but does not have the clickable thing to where you can join in. https://discord.com/rich-presence shows some examples where there are options to join, ask to join, spectate. Mudlet has some stub functions that print a debug message when someone clicks to Join or Spectate or whatever, but probably nothing for creating them. https://github.com/Mudlet/Mudlet/blob/development/src/discord.cpp#L301
S
SlySven ☕676d ago
Those stubs were/are purely for debugging - the normal usage of those buttons are to invite the other party to start up their copy of the application (think something like a FPS e.g. Doom™️) and to join in or watch the same game as the originator is playing. Mudlet cannot - I think - do exactly that because not only would the button clicker's copy of Mudlet have to start up, it would also have to connect up to the same MUD as the originator is playing. If that is a MUD that does provide a Discord Application ID to Mudlet - so that Mudlet can cause the RP to show THAT MUD (like the IRE ones do) then it might be possible to fire up a connection, but not otherwise (when the RP just reports "Playing Mudlet")...