added "is discord working" bool back

This commit is contained in:
2023-05-02 12:53:45 +02:00
parent e29a05d62c
commit ec4925ab56
9 changed files with 14 additions and 57 deletions

View File

@@ -5,9 +5,9 @@ const ExportPlugin = preload("res://addons/discord-sdk-gd/export.gd")
var loaded_exportplugin = ExportPlugin.new()
func _enter_tree():
add_autoload_singleton("DiscordSDK", "res://addons/discord-sdk-gd/sdk_utility.gd")
add_autoload_singleton("updater_discordsdk", "res://addons/discord-sdk-gd/sdk_utility.gd")
add_export_plugin(loaded_exportplugin)
func disable_plugin():
remove_autoload_singleton("DiscordSDK")
remove_autoload_singleton("updater_discordsdk")
remove_export_plugin(loaded_exportplugin)

View File

@@ -1,55 +1,4 @@
extends Node
const result: Array[String] = [
"Ok",
"ServiceUnavailable",
"InvalidVersion",
"LockFailed",
"InternalError",
"InvalidPayload",
"InvalidCommand",
"InvalidPermissions",
"NotFetched",
"NotFound",
"Conflict",
"InvalidSecret",
"InvalidJoinSecret",
"NoEligibleActivity",
"InvalidInvite",
"NotAuthenticated",
"InvalidAccessToken",
"ApplicationMismatch",
"InvalidDataUrl",
"InvalidBase64",
"NotFiltered",
"LobbyFull",
"InvalidLobbySecret",
"InvalidFilename",
"InvalidFileSize",
"InvalidEntitlement",
"NotInstalled",
"NotRunning",
"InsufficientBuffer",
"PurchaseCanceled",
"InvalidGuild",
"InvalidEvent",
"InvalidChannel",
"InvalidOrigin",
"RateLimited",
"OAuth2Error",
"SelectChannelTimeout",
"GetGuildTimeout",
"SelectVoiceForceRequired",
"CaptureShortcutAlreadyListening",
"UnauthorizedForAchievement",
"InvalidGiftCode",
"PurchaseError",
"TransactionAborted",
"DrawingInitFailed"
]
func _process(delta):
Discord_SDK.coreupdate()
func get_sdk_info():
return result[Discord_SDK.get_result_int()]