Coder Social home page Coder Social logo

discord-rpc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-rpc's Issues

Images do not show

I'm using the example code provided in a C# project and everything is working fine except for the images, both large and small. I've uploaded them to the dashboard and am using the corresponding key (the name I gave the image, that shows up next to it post upload). I've yet to get any of the images to show.

presence.largeImageKey = "lobby";

image

image

Allow setting Rich Presence activity types via RPC

Right now, RPC rich presence clients don't allow to set activity types, however, this should be possible, because many people are making apps for music and other integrations using RPC. Also, since devs have clarified that these apps are allowed, having (especially) the "listening to" type would be beneficial.

[Request] Function to send callback to party host that joining player has loaded app and is ready.

In my frontend for Duke3D, I would like a way for joining players to able to signal to the host that they've managed to launch the app and are ready (something like Discord_JoinCompleted() that I can stick in joinGame somewhere), so that the host running the frontend can increment the party size accordingly at the appropriate time, and close the app if the party size is reached. (As by then the frontend would launch the game already, and is no longer needed).

Reason I ask this, is I can't increment the party size in the joinRequest callback, as it can cause a race condition, where the party is signaled as being full, or the frontend quits before the joining player's discord acknowledges that they've been accepted into the match, cancelling the join request for them. I could create my own signal back through winsocks, or some other socket library, but that is a royal pain.

The last option is just not updating the party size, and keeping the frontend running while the game itself is waiting for connections, but that allows people to attempt joining when the party is already full and the game is in progress, which is far from good. (And what I'm doing right now just to make it usable.)

Lastly, I'd like an equivalent of "joinRequest" when players just join through invites. Just so I can update the state of the frontend when people join.

macOS Compilation Issue

Having trouble compiling on macOS. Any pointer in the right direction would be appreciated. Let me know if there's any information that could be helpful.

cmake version

cmake --version
cmake version 3.7.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

clang version

clang -v
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
cmake --build . --config Release --target install
Scanning dependencies of target clangformat
[  0%] Built target clangformat
Scanning dependencies of target discord-rpc
[ 12%] Building CXX object src/CMakeFiles/discord-rpc.dir/discord-rpc.cpp.o
In file included from /Users/m/88dots/discord-rpc/src/discord-rpc.cpp:5:
In file included from /Users/m/88dots/discord-rpc/src/rpc_connection.h:3:
/Users/m/88dots/discord-rpc/src/connection.h:14:10: error: function definition does not declare parameters
    bool isOpen{false};
         ^
In file included from /Users/m/88dots/discord-rpc/src/discord-rpc.cpp:5:
In file included from /Users/m/88dots/discord-rpc/src/rpc_connection.h:4:
/Users/m/88dots/discord-rpc/src/serialization.h:95:16: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    using Ch = char;
               ^
/Users/m/88dots/discord-rpc/src/serialization.h:117:25: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using MallocAllocator = rapidjson::CrtAllocator;
                        ^
/Users/m/88dots/discord-rpc/src/serialization.h:118:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using PoolAllocator = rapidjson::MemoryPoolAllocator<MallocAllocator>;
                      ^
/Users/m/88dots/discord-rpc/src/serialization.h:119:14: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using UTF8 = rapidjson::UTF8<char>;
             ^
/Users/m/88dots/discord-rpc/src/serialization.h:121:24: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using StackAllocator = FixedLinearAllocator<2048>;
                       ^
/Users/m/88dots/discord-rpc/src/serialization.h:122:1: error: unknown type name 'constexpr'
constexpr size_t WriterNestingLevels = 2048 / (2 * sizeof(size_t));
^
/Users/m/88dots/discord-rpc/src/serialization.h:122:17: error: expected ';' after top level declarator
constexpr size_t WriterNestingLevels = 2048 / (2 * sizeof(size_t));
                ^
                ;
/Users/m/88dots/discord-rpc/src/serialization.h:124:3: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
  rapidjson::Writer<DirectStringBuffer, UTF8, UTF8, StackAllocator, rapidjson::kWriteNoFlags>;
  ^
/Users/m/88dots/discord-rpc/src/serialization.h:131:53: error: use of undeclared identifier 'WriterNestingLevels'
      : JsonWriterBase(stringBuffer_, &stackAlloc_, WriterNestingLevels)
                                                    ^
/Users/m/88dots/discord-rpc/src/serialization.h:140:26: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using JsonDocumentBase = rapidjson::GenericDocument<UTF8, PoolAllocator, StackAllocator>;
                         ^
/Users/m/88dots/discord-rpc/src/serialization.h:161:19: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using JsonValue = rapidjson::GenericValue<UTF8, PoolAllocator>;
                  ^
/Users/m/88dots/discord-rpc/src/serialization.h:166:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
        auto member = obj->FindMember(name);
        ^
/Users/m/88dots/discord-rpc/src/serialization.h:177:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
        auto member = obj->FindMember(name);
        ^
/Users/m/88dots/discord-rpc/src/serialization.h:190:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
        auto member = obj->FindMember(name);
        ^
In file included from /Users/m/88dots/discord-rpc/src/discord-rpc.cpp:5:
/Users/m/88dots/discord-rpc/src/rpc_connection.h:8:1: error: unknown type name 'constexpr'
constexpr size_t MaxRpcFrameSize = 64 * 1024;
^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:8:17: error: expected ';' after top level declarator
constexpr size_t MaxRpcFrameSize = 64 * 1024;
                ^
                ;
/Users/m/88dots/discord-rpc/src/rpc_connection.h:11:10: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
    enum class ErrorCode : int {
         ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:11:16: error: ISO C++ forbids forward references to 'enum' types
    enum class ErrorCode : int {
               ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:11:32: error: expected '(' for function-style cast or type construction
    enum class ErrorCode : int {
                           ~~~ ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:17:10: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
    enum class Opcode : uint32_t {
         ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:17:16: error: ISO C++ forbids forward references to 'enum' types
    enum class Opcode : uint32_t {
               ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:17:34: error: expected '(' for function-style cast or type construction
    enum class Opcode : uint32_t {
                        ~~~~~~~~ ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:31:22: error: use of undeclared identifier 'MaxRpcFrameSize'
        char message[MaxRpcFrameSize - sizeof(MessageFrameHeader)];
                     ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:34:10: warning: scoped enumerations are a C++11 extension [-Wc++11-extensions]
    enum class State : uint32_t {
         ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:34:16: error: ISO C++ forbids forward references to 'enum' types
    enum class State : uint32_t {
               ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:34:33: error: expected '(' for function-style cast or type construction
    enum class State : uint32_t {
                       ~~~~~~~~ ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:41:21: error: function definition does not declare parameters
    BaseConnection* connection{nullptr};
                    ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:42:11: error: function definition does not declare parameters
    State state{State::Disconnected};
          ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:43:12: error: function definition does not declare parameters
    void (*onConnect)(){nullptr};
           ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:44:12: error: function definition does not declare parameters
    void (*onDisconnect)(int errorCode, const char* message){nullptr};
           ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:45:10: error: function definition does not declare parameters
    char appId[64]{};
         ^
/Users/m/88dots/discord-rpc/src/rpc_connection.h:46:9: error: function definition does not declare parameters
    int lastErrorCode{0};
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
14 warnings and 20 errors generated.
make[2]: *** [src/CMakeFiles/discord-rpc.dir/discord-rpc.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/discord-rpc.dir/all] Error 2
make: *** [all] Error 2

Allowing upload of assets via Hash

So, I'm working on a neat little feature that lets a game create images based on the current state of the game. But since the Rich Presence is restricted to pre-uploaded assets of the application used, I am in quite a pickle. Wouldn't it allow for more options to allow the DiscordRPC to upload pictures via a hash-key of the picture, instead of relying on pre-uploded assets? The profile pictures are send like that on a JoinRequest, so I doubt it should be that hard to allow it the other way around.

C# Example/Wrapper

The C# wrapper for the Discord RPC SDK is flawed in the RequestCallback. It should be ref DiscordRpc.JoinRequest request instead of DiscordRpc.JoinRequest request.

Errors with CMAKE_BUILD_TYPE=Release

CMAKE_BUILD_TYPE=Release builds stuff in Release mode on Linux (-O3 -DNDEBUG and whatnot), which results in the following errors (probably because assert is optimized out):

../src/serialization.h:75:25: error: unused parameter 'originalPtr' [-Werror,-Wunused-parameter]
    void* Realloc(void* originalPtr, size_t originalSize, size_t newSize)
                        ^
../src/serialization.h:75:45: error: unused parameter 'originalSize' [-Werror,-Wunused-parameter]
    void* Realloc(void* originalPtr, size_t originalSize, size_t newSize)
                                            ^

Steam custom game mod support

Hello, as far as I can tell replacing steam://run/ with steam://rungameid/ in Discord_RegisterSteamGame makes it possible to additionally launch Steam custom game mods (which you can't launch otherwise because they don't have a Steam ID). This is important for me as I want to add support to a Half-Life mod which is not on the Steam store.

[Suggestion] Version number to check against

Would it be possible to add a version we can check against for those of us using the win32-dynamic build?

For example, if we implement something that requires at minimum v2.1.0, there should be a way to check that the user has a DLL that meets the minimum version. Here's how it could be potentially implemented:

DISCORD_EXPORT float Discord_GetVersion(void) const;

Usage:

if (Discord_GetVersion() < 2.1f) {
  Error("Your Discord RPC plugin is out of date, please update it and try again.");
}

This would ensure any projects relying on the dynamic branch (which may require users to download the DLL manually) will continue to work correctly, without having to resort to customer feedback of "why isn't X working?!" -- unless this is guaranteed to never happen, of course!

Windows XP "support"

Yes, I know, Windows XP, EOL and whatnot, but my game supports Windows XP and some people for whatever reason still play on Windows XP. I link discord-rpc statically and due to its usage of the RegSetKeyValueW API call the game fails to start.

Perhaps it's possible to replace it with a call that exists on Windows XP, or load it dynamically? This would also allow to get rid of the MINGW Vista defines at the top of that file.

If this is out of scope of this repository, I'll come up with something myself.

Crash during shutdown (documentation bug)

The documentation over at discord does not mention that you have to call Discord_Shutdown even though it is vital for a clean shutdown.

If you don't call Discord_Shutdown then the application does not shut down properly. You have a static variable of type std::thread which will run its destructor during termination of the application. Running a destructor on a running thread is not allowed and will crash the program (calls std::terminate)

This prevents a clean exit because other destructors and onexit handlers are not executed.

You apparently have Discord_Shutdown which properly terminates the thread, allowing clean shutdown of the game, but you haven't mentioned this anywhere in your documentation.

Launching Steam games on Linux doesn't work (at least without a DE)

We register a desktop file containing xdg-open steam://rungameid/<number> %u, but it turns out that when we do xdg-open discord-<number>:// it actually runs xdg-open steam://rungameid/<number> discord-<number>:// (so it appends the original "url") and then complains about the second argument (since there's only supposed to be one argument to xdg-open).

Not sure how to handle this (is there a way to prevent that argument from getting appended?). Looking at the xdg-open source, for me (no DE, maybe that's the problem) the final line that executes the command is "$command_exec" "$@" where $command_exec turns out to be xdg-open steam://rungameid/<number> (from the .desktop file), and $@ is discord-<number>://.

Unity Example does not connect to discord

When launching Unity example it shows in log:

"Discord: init",
"Discord: on click!"

On exit: "Discord: shutdown"

No message "Discord: ready". It shows also "Discord Disconnected". No other messages or errors in log.
Tried from latest master, also tried library replacement from released archive zip - the same result

Error at LSSetDefaultHandlerForURLScheme() (OSStatus -54)

Using Xcode, I am linking the compiled lib in my native Objective-C++ based app. Line 67 of discord_register_osx.m is creating an error, OSStatus -54. This is the code for insufficient privileges usually (i.e., when you try to open a file you aren't allowed), so I'm not sure how this is happening. No clue why, of all things, LSSetDefaultHandlerForURLScheme() would be doing this. Also of note: I don't think this is an issue with the example, though I never have been able to get it to run properly in the first place.

Need a way to check if discord is running, or have a callback run when discord isn't present when calling Discord_Initialize.

In my code, I have a loop like this:

	InitDiscord();
	while (discord_status == DISCORD_WAITING)
	{
		handleevents();
		Discord_RunCallbacks();
	}

Because I need to wait for Discord to be ready, before I can proceed with the rest of the game's startup (since multiplayer connections happen during this phase).

This loop works perfectly fine if Discord is running, it'll wait until Rich Presence is ready, and then proceed. (All the different handlers will change the value of DISCORD_STATUS, including the error callback.)

However, if Discord isn't running, there's no way to check this, not even the error callback fires, and thus the game just hangs here. I'd like to have some sort of callback or return value here.

Binary files in repository

This repository seems to contain multiple binaries. Such files are not meant to be stored in a git repository, they don't compress very well and degrade git performance.

I would urge to stop storing them here and rather rely on fetching (manually or automatically) released versions from https://github.com/discordapp/discord-rpc/releases or using Git-LFS fallback (but that comes with some limitations on GitHub when used with free tier).

Unreal example project Solution doesn't compile

Error at:

Plugins\discordrpc\Source\discordrpc\Public\DiscordRpcBlueprint.h

Caused due to the include "DiscordRpcBlueprint.generated.h" not being at the end of the includes.

Build succeeds once moving that line to the bottom of the includes.

Unable to compile Unreal Example project

Hello,

I am currently trying to get the Unreal Example running, but I am running into issues.
I have placed the .lib file in \Source\ThirdParty\discordrpcLibrary\x64\Release, but I get these errors when compiling

Module.discordrpc.cpp.obj
: error LNK2019: unresolved external symbol __imp_Discord_Initialize referenced in function "public: void __cdecl UDiscordRpc::Initialize(class FString const &,bool,class FString const &)" (?Initialize@UDiscordRpc@@QEAAXAEBVFString@@_N0@Z)
2>Module.discordrpc.cpp.obj : error LNK2019: unresolved external symbol __imp_Discord_Shutdown referenced in function "public: void __cdecl UDiscordRpc::Shutdown(void)" (?Shutdown@UDiscordRpc@@QEAAXXZ)
2>Module.discordrpc.cpp.obj : error LNK2019: unresolved external symbol __imp_Discord_RunCallbacks referenced in function "public: void __cdecl UDiscordRpc::RunCallbacks(void)" (?RunCallbacks@UDiscordRpc@@QEAAXXZ)
2>Module.discordrpc.cpp.obj : error LNK2019: unresolved external symbol __imp_Discord_UpdatePresence referenced in function "public: void __cdecl UDiscordRpc::UpdatePresence(void)" (?UpdatePresence@UDiscordRpc@@QEAAXXZ)
2>C:\Users\Administrator\Downloads\discord-rpc-master(1)\discord-rpc-master\examples\unrealstatus\Plugins\discordrpc\Binaries\Win64\UE4Editor-discordrpc.dll : fatal error LNK1120: 4 unresolved externals

I tried to solve this by adding PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Include")); to discordrpcLibrary.Build.cs and copy discord-rpc.h from the include dir into it, but it still won't find it.

How does one resolve this error? It looks like it doesn't find the additional header file to me.
I am using the win64-static lib.

Missing discriminator for DiscordJoinRequest

The payload for ACTIVITY_JOIN_REQUEST contains a full user object (exluding account security/type details) however it reads only username, user_id, and avatar.
The discriminator is incredibly helpful for apps to be specific about what user wants to join.

Was this intentionally left out?
See Section

Example

{
    "evt":"ACTIVITY_JOIN_REQUEST",
    "data": {
        "user": {
            "avatar":"e7032e1e1e602cd5123488da2a75f041",
            "id":"86699011792191488",
            "discriminator":"6688",
            "username":"Minn"
        }
    },
    "cmd":"DISPATCH",
    "nonce":null
}

Linux Unity Support

In the Unity example, there is only a Windows DLL (Unity won't give options to include it with Linux). Will there be Linux support eventually?

OnJoin doesn't fire in Unreal Engine 4.

I have set up a client which sends this presence data:

m7j5qlr

Then I made an invitation in Discord (as the user who started the game first)

dsasd

With a second Discord user I then press the Join button and the game launches for the second player, but the event doesn't get fired.

join

Using Process Explorer I also couldn't see any extra parameters passed to the client. How is the Join Secret passed to the game? Why is my event not being fired? Am I understanding something wrong here?

Nvm.

Nevermind. I figured out.

OSX and Linux Libraries in Release Package?

The current packages currently only include Windows 32-bit and 64-bit DLLs. As the library (in theory?) supports OSx and Linux, is there a reason prebuilt versions aren't available? As a Unity developer it would make implementation orders of magnitude simpler if they were available as well as Windows builds.

Thanks!

Ingame personal inviting

Any way to invite a specific person and have that person be able to accept that invite ingame? If there isn't, this might be something useful to add. Right now you need to press the joim button inside Discord to accept an invite, which works great for groups but is kinda annoying per person.

I'm assuming you need to be able to get your friends list somehow.

Add support for Mingw compilations

It looks like the current solution doesn't compile with CMake with mingw compilers, meaning a cross-compilation from Linux to Windows doesn't work.

[Unity] Using DiscordRpc.Respond returns code 4012 "no join request for that user"

Currently trying to add Discord RPC to our game in Unity and for some reason DiscordRpc.Respond always ends up popping an error with code 4012, even when my requestCallback is simple (view example below).

private void OnRequestCallback(DiscordRpc.JoinRequest request)
{
    DiscordRpc.Respond(request.userId, DiscordRpc.Reply.Yes);
}

My party stats are setup properly (partyId, partySize, partyMax) and my joinSecret is set to my partyId but encrypted with aes256.

The request to join button is shown properly to another user that's been added as a test user of our app.

That error code doesn't make much sense either considering I'm responding to a request callback.

Compile errors in VS 2017

I've manually created a VS 2017 project (without cmake) to compile discord-rpc for statically linking with my game (I need specific compiler settings for static linking to work)

I'm getting a bunch of compile errors in discord_register_win.cpp because it includes psapi.h before windows.h - types like BOOL, DWORD and WINAPI aren't defined apparently - swapping the order to include windows.h first fixes the compile errors.

Did you chose this include order with a particular reason in mind or did I miss something while creating my project file? Or is this actually an oversight and discord currently does not compile in VS 2017 without this fix?

[Linux] Can't compile without IO thread

Trying to compile the library with -DENABLE_IO_THREAD=OFF results in errors.

discord-rpc/build$ cmake -DBUILD_DYNAMIC_LIB=ON -DENABLE_IO_THREAD=OFF ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/max/Dropbox/projects/sublime-rpc/discord-rpc/build
discord-rpc/build$ make
[  0%] Built target clangformat
Scanning dependencies of target discord-rpc
[ 12%] Building CXX object src/CMakeFiles/discord-rpc.dir/discord-rpc.cpp.o
c++: error: discord-rpc: No such file or directory
c++: error: PUBLIC: No such file or directory
make[2]: *** [src/CMakeFiles/discord-rpc.dir/build.make:63: src/CMakeFiles/discord-rpc.dir/discord-rpc.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:118: src/CMakeFiles/discord-rpc.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
> 2

rapidjson conflict

Our project uses an older version of rapidjson and by including discord-rpc as a static linked library causes issues with the compiler not knowing which to use.

Although this was solved for us by dropping the same version of rapidjson in to our project. This may not be viable for others.

Some joining players don't fire join callbacks.

Seems for some reason, and only for some users, the Discord desktop client doesn't launch my app when they get a "yes" response from it in the join request handler. Even if they have the game registered fully, and added to their "games" list in Discord.

Includes needed re-ordering to successfully compile

I had to re-order the includes in discord_register_win.cpp in order to successfully compile as Psapi.h assumes windows.h has already been included:

#include <windows.h>
#include <Psapi.h>
#include <Strsafe.h>

Join Request callback firing with empty data on 32-bit DLL (Unity)

The game I am working on currently only uses a 32-bit build, but I seem to have an issue with the 32-bit DLL.

When receiving the "join request" callback from another user asking to join, the data packet received is always completely empty. I tried this using the button-clicker example, creating two builds (32-bit and 64-bit) with the 2.0.1 release.

Both builds will fire off the "join request" callback but only the 64-bit will have data.

e.g:
from the logs from the 64-bit version:
Discord: join request [username]: [userid]

on the 32-bit version, I just get the basic printout with no values
Discord: join request :

In my actual game the data is also not there with the 32-bit DLL and after trying to use these null values the whole application crashes. It works fine with the 64-bit DLL.

I'm using Unity 2017.1.1.p2

Constructued DiscordRPC class gets destroyed when doing anything related to Sessions in Unreal Engine.

When hosting or joining a session. The DiscordRPC class gets destroyed/becomes invalid and it won't be able to send presences or check for callbacks anymore. OnDisconnected & OnErrored does not fire either when this happens.

However, if you construct the class again after it's become invalid everything seems to work like normal again. OnConnected does not re-fire when you reconstruct the class.

Use discord-rpc on Qt

I'm trying to export the lib to the Qt IDE, and use it, I add the folder to the project's folder and add this to the .pro file:

INCLUDEPATH += discord-rpc/include

LIBS += -L"discord-rpc/lib/discord-rpc.lib"

when I try to include the discord-rpc.h in my main file the functions of the lib don't work

image

when I type ctrl and click in the included file, in the line #include "discord-rpc.h", I go to the file discord-rpc.h, but the functions don't work on the main file.

What is happening?

Discord_Shutdown does not unset Discord user's Playing status

For both the send-presence sample and our own integration, a call to Discord_Shutdown does not call the disconnect handler, and the Playing <game> status in Discord stays there for the user even after the process has been shut down. Calling Discord_UpdateConnection() and Discord_RunCallbacks() after Discord_Shutdown() (to really cover all our bases) didn't work either. The only fix for this is restarting Discord client-side; the RP status disappears then. Time doesn't seem to play a role either, as the RP just stays there.

The send-presence sample that was tested was taken from the 2.0.1 release of this repo. For our own integration, discord-rpc was compiled as a 32-bit DLL from the master source as of commit 5d5bc82 on a Win 7 64-bit machine:

cmake .. -DCMAKE_INSTALL_PREFIX=..\out -DBUILD_SHARED_LIBS=ON -DUSE_STATIC_CRT=ON -DENABLE_IO_THREAD=OFF -G "Visual Studio 14 2015"

Web API

Hi there;

First of all, great project!
I have an online game (foda.gq), it has a nodejs back-end
so it's 100% javascript - well there's also the css and html ;D
I would like to integrate it with Discord Rich Presence.
Is that possible? Can I help making it possible, how?

Thanks a lot!

Need some way to tell Discord what command line parameters joining players need to use.

To quote my comment on issue #35: "Of course, I could avoid this, and any other issues altogether if there were a way to set what command line arguments are to be used when another player launches the game through Discord. (ie. Some way to tell their Discord client they'll need to launch the game with "/g mymod.pk3 /n:0 123.231.213.132", like some .partycmd field in the discordPresence struct or something.)"

In short, this feature, would render issue #35 a moot point for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.