Merge pull request #2 from vaporvee/main

merge 2
This commit is contained in:
Yannik
2023-04-25 23:16:38 +02:00
committed by GitHub
3 changed files with 8 additions and 9 deletions

View File

@@ -8,9 +8,10 @@ git submodule update --init
# Addon Usage :rocket:
1. [Download the addon](https://github.com/vaporvee/discord-sdk-godot/releases/latest/download/ADDON-Discord-SDK-Godot.zip/)
2. Put the `discord-sdk-gd/` folder in a `addons/` folder in your Godot project
3. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up reopen the project)
4. Create an Application under https://discord.com/developers/applications and get the Application ID
5. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys
3. Enable the addon in your Project Settings under "Plugins" and "DiscordSDK". (if it doesn't show up restart your project and try again)
4. Restart your project
5. Create an Application under https://discord.com/developers/applications and get the Application ID
6. (optional) Set images under "Rich Presence" and "Art Assets" and remember the keys
```gdscript
extends Node
@@ -26,7 +27,7 @@ func _ready():
Discord_Activity.small_image_text = "Fighting the end boss! D:"
Discord_Activity.start_timestamp = int(Time.get_unix_time_from_system()) # "02:41 elapsed"
#Discord_Activity.end_timestamp = 2492978400 # "15:41 left" (but currently 31. 12. 2048 in unix time)
# Discord_Activity.end_timestamp = int(Time.get_unix_time_from_system()) + 3600 # +1 hour in unix time
Discord_Activity.refresh() # Always refresh after changing the values!

View File

@@ -2,9 +2,9 @@
extends EditorExportPlugin
func _export_file(path, type, features):
if path[2] == "windows":
if features[2] == "windows":
add_shared_object("res://addons/discord-sdk-gd/bin/windows/discord_game_sdk.dll",[],"/")
elif path[2] == "linux":
elif features[2] == "linux":
add_shared_object("res://addons/discord-sdk-gd/bin/linux/discord_game_sdk.so",[],"/")
elif path[2] == "macos":
elif features[2] == "macos":
add_shared_object("res://addons/discord-sdk-gd/bin/macos/discord_game_sdk.dylib",[],"/")

View File

@@ -8,8 +8,6 @@ func _enter_tree():
add_autoload_singleton("discord_coreupdater", "res://addons/discord-sdk-gd/discord_coreupdater.gd")
add_export_plugin(loaded_exportplugin)
func disable_plugin():
remove_autoload_singleton("discord_coreupdater")
remove_export_plugin(loaded_exportplugin)