Skip to content

Commit dd43ec6

Browse files
authored
Merge pull request #7 from cake4everyone/discord-presence
Adding Discord Presence
2 parents 1239106 + 7fc36cb commit dd43ec6

38 files changed

+917
-34
lines changed

addons/discord-rpc-gd/Debug.svg

+10
Loading
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://ufh1hha1ehui"
6+
path="res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://addons/discord-rpc-gd/Debug.svg"
14+
dest_files=["res://.godot/imported/Debug.svg-d4cb8599fa7926b76a2d6e40d2efd949.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
35+
svg/scale=1.0
36+
editor/scale_with_editor_scale=false
37+
editor/convert_colors_with_editor_theme=false
3.86 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://csl0e2px0cwc1"
6+
path="res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://addons/discord-rpc-gd/Logo_V2_No_Bg.png"
14+
dest_files=["res://.godot/imported/Logo_V2_No_Bg.png-ed667fb599fe1e17ebcfc361ff7c9c93.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MINIMUM GODOT VERSION: 4.2
2+
3+
PLEASE ACTIVATE THE PLUGIN UNDER Project -> Project Settings... -> Plugins -> DiscordRPC -> Status
4+
IGNORE THE RED ERRORS ON THE FIRST 2 RESTARTS
5+
READ THE TUTORIAL LINKED IN THE WINDOW THAT WILL OPEN ON PLUGIN ENABLE
6+
7+
If nothing works, enable the plugin and delete /addons/discord-rpc-gd/bin/.gdignore
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[configuration]
2+
3+
entry_symbol = "discordrpcgd_library_init"
4+
compatibility_minimum = 4.1
5+
6+
[libraries]
7+
8+
macos.debug = "macos/libdiscord_game_sdk_binding_debug.dylib"
9+
macos.release = "macos/libdiscord_game_sdk_binding.dylib"
10+
windows.debug.x86_64 = "windows/discord_game_sdk_binding_debug.dll"
11+
windows.release.x86_64 = "windows/discord_game_sdk_binding.dll"
12+
linux.debug.x86_64 = "linux/libdiscord_game_sdk_binding_debug.so"
13+
linux.release.x86_64 = "linux/libdiscord_game_sdk_binding.so"
14+
linux.debug.arm64 = "linux/libdiscord_game_sdk_binding_debug.so"
15+
linux.release.arm64 = "linux/libdiscord_game_sdk_binding.so"
16+
linux.debug.rv64 = "linux/libdiscord_game_sdk_binding_debug.so"
17+
linux.release.rv64 = "linux/libdiscord_game_sdk_binding.so"
18+
19+
[dependencies]
20+
21+
macos = { "macos/libdiscord_game_sdk.dylib": "" }
22+
windows.debug.x86_64 = { "windows/discord_game_sdk.dll": "" }
23+
windows.release.x86_64 = { "windows/discord_game_sdk.dll": "" }
24+
linux.debug.x86_64 = { "linux/libdiscord_game_sdk.so": "" }
25+
linux.release.x86_64 = { "linux/libdiscord_game_sdk.so": "" }
26+
linux.debug.arm64 = { "linux/libdiscord_game_sdk.so": "" }
27+
linux.release.arm64 = { "linux/libdiscord_game_sdk.so": "" }
28+
linux.debug.rv64 = { "linux/libdiscord_game_sdk.so": "" }
29+
linux.release.rv64 = { "linux/libdiscord_game_sdk.so": "" }
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

addons/discord-rpc-gd/example.gd

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
class_name DiscordRPCTutorial
2+
extends Node
3+
4+
## 1. Put the addons/ folder in your Godot project[br]
5+
## 2. Enable the addon in your Project Settings under "Plugins" and "DiscordRPC". [br](if it doesn't show up restart your project and try again)[br]
6+
## 3. Restart your project[br]
7+
## 4. Create an Application under https://discord.com/developers/applications and get the Application ID br]
8+
## 5. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys[br]
9+
##
10+
## This is your [code]_ready()[/code] function wich could be anywhere
11+
## [codeblock]
12+
## func _ready():
13+
## # Application ID
14+
## DiscordRPC.app_id = 1099618430065324082
15+
## # this is boolean if everything worked
16+
## print("Discord working: " + str(DiscordRPC.get_is_discord_working()))
17+
## # Set the first custom text row of the activity here
18+
## DiscordRPC.details = "A demo activity by vaporvee#1231"
19+
## # Set the second custom text row of the activity here
20+
## DiscordRPC.state = "Checkpoint 23/23"
21+
## # Image key for small image from "Art Assets" from the Discord Developer website
22+
## DiscordRPC.large_image = "game"
23+
## # Tooltip text for the large image
24+
## DiscordRPC.large_image_text = "Try it now!"
25+
## # Image key for large image from "Art Assets" from the Discord Developer website
26+
## DiscordRPC.small_image = "boss"
27+
## # Tooltip text for the small image
28+
## DiscordRPC.small_image_text = "Fighting the end boss! D:"
29+
## # "02:41 elapsed" timestamp for the activity
30+
## DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system())
31+
## # "59:59 remaining" timestamp for the activity
32+
## DiscordRPC.end_timestamp = int(Time.get_unix_time_from_system()) + 3600
33+
## # Always refresh after changing the values!
34+
## DiscordRPC.refresh()
35+
## [/codeblock]
36+
##
37+
## @tutorial(More information here): https://github.com/vaporvee/discord-rpc-godot/wiki/Quick-start
38+
## @tutorial(Make your Application ID and else here): https://discord.com/developers/applications

addons/discord-rpc-gd/logo.png

3.86 KB
Loading

addons/discord-rpc-gd/logo.png.import

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="CompressedTexture2D"
5+
uid="uid://csl0e2px0cwc1"
6+
path="res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"
7+
metadata={
8+
"vram_texture": false
9+
}
10+
11+
[deps]
12+
13+
source_file="res://addons/discord-rpc-gd/logo.png"
14+
dest_files=["res://.godot/imported/logo.png-bacb448eabae556bdb0659359ea4e4af.ctex"]
15+
16+
[params]
17+
18+
compress/mode=0
19+
compress/high_quality=false
20+
compress/lossy_quality=0.7
21+
compress/hdr_compression=1
22+
compress/normal_map=0
23+
compress/channel_pack=0
24+
mipmaps/generate=false
25+
mipmaps/limit=-1
26+
roughness/mode=0
27+
roughness/src_normal=""
28+
process/fix_alpha_border=true
29+
process/premult_alpha=false
30+
process/normal_map_invert_y=false
31+
process/hdr_as_srgb=false
32+
process/hdr_clamp_exposure=false
33+
process/size_limit=0
34+
detect_3d/compress_to=1

0 commit comments

Comments
 (0)