8 Commits

Author SHA1 Message Date
Louis
f4a009ceb4 Update DiscordRpc.uplugin 2022-10-09 19:56:43 +02:00
Louis
419f2eb786 Update DiscordRpcBlueprint.h 2022-10-09 15:59:56 +02:00
Louis
9feb8b49df Update DiscordRpc.uplugin 2022-10-09 14:27:51 +02:00
Louis
e3965228a6 Update README.md 2022-09-26 11:55:22 +02:00
Louis
a8e405111d Update README.md 2022-09-24 20:48:15 +02:00
Louis
9f55233275 Update README.md 2022-09-24 20:37:19 +02:00
Louis
a17b65824b Merge pull request #1 from LouisRaverdy/add-license
Create LICENSE
2022-09-19 18:18:08 +02:00
Louis
7e302aa747 Create LICENSE 2022-09-19 18:17:44 +02:00
4 changed files with 52 additions and 26 deletions

View File

@@ -5,14 +5,14 @@
"FriendlyName": "Discord RPC",
"Description": "Wrap the Discord RPC library.",
"Category": "Messaging",
"CreatedBy": "Chris Marsh <chris@discordapp.com> and updated by Louis R.",
"CreatedByURL": "https://discordapp.com/",
"CreatedBy": "Chris Marsh & Louis Raverdy",
"CreatedByURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"DocsURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"MarketplaceURL": "",
"SupportURL": "https://github.com/LouisRaverdy/DiscordPluginUE",
"CanContainContent": true,
"IsBetaVersion": true,
"Installed": false,
"IsBetaVersion": false,
"Installed": true,
"Modules": [
{
"Name": "DiscordRpc",
@@ -21,7 +21,6 @@
"WhitelistPlatforms" :
[
"Win64",
"Linux",
"Mac"
]
}

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 Louis Raverdy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -21,12 +21,18 @@ You need to create something like this in your **Game Instance** :
![InitDiscord](https://user-images.githubusercontent.com/47295080/147773538-c4ac76cd-2199-4a1a-af90-cc695d8c0386.png)
> **Note :** Make sure your Game Instance is defined as default in the Project Settings. (Project Settings -> Maps & Modes -> Game Instance Class)
For remove your presence when you exit the game you need to add this to your **Game Instance** :
![shutdown](https://user-images.githubusercontent.com/47295080/192113957-b7675e3f-161d-4d23-bb98-e5ce6f48a586.png)
## Nodes
For edit your presence in your game use this code (read the image next to it to understand the fields of the node) :
To update your presence for your game, you can use this code (read the image next to it to understand the fields of the node) :
![SetPresenceDiscord](https://user-images.githubusercontent.com/47295080/147773549-6f106fda-835d-4cff-97f8-c220627b2dbf.png)
> **Note :** For use image in rich presence you need to upload them on your Discord developer game page (Rich Presence -> Art Assets)
> **Note :** To use image in rich presence you need to upload them on your Discord developer game page (Rich Presence -> Art Assets)
### **More advanced documentation coming soon.**

View File

@@ -14,13 +14,13 @@ USTRUCT(BlueprintType)
struct FDiscordUserData {
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString userId;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString username;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString discriminator;
UPROPERTY(BlueprintReadOnly)
UPROPERTY(BlueprintReadOnly, Category = "Discord")
FString avatar;
};
@@ -53,36 +53,36 @@ USTRUCT(BlueprintType)
struct FDiscordRichPresence {
GENERATED_USTRUCT_BODY()
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString state;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString details;
// todo, timestamps are 64bit, does that even matter?
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int startTimestamp = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int endTimestamp = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString largeImageKey;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString largeImageText;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString smallImageKey;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString smallImageText;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString partyId;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int partySize = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
int partyMax = 0;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString matchSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString joinSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
FString spectateSecret;
UPROPERTY(BlueprintReadWrite)
UPROPERTY(BlueprintReadWrite, Category = "Discord")
bool instance = false;
};