activity resource and fixed connection ready signal

This commit is contained in:
2025-03-26 22:06:11 +01:00
parent b363a11b3a
commit ce0aef8dc0
8 changed files with 39 additions and 21 deletions

View File

@@ -3,11 +3,14 @@ extends DiscordConnector
func _on_user_connected(access_token: String, refresh_token: String, expires_in: int) -> void:
print_debug("Access token: %s \nRefresh Token: %s \nExpires in: %s" % [access_token, refresh_token, expires_in])
func _on_user_updated() -> void:
print_debug("USER UPDATED")
func _on_user_connection_failed(error: String) -> void:
push_error("User connection failed! Error: " + error)
func _on_user_update_failed(error: String) -> void:
push_error("User update failed! Error: " + error)
func _on_connection_ready() -> void:
print_debug("CONNECTION READY")
func _on_connection_error(error: String) -> void:
push_error(error)

View File

@@ -1,11 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://dyc3kseph4el7"]
[gd_scene load_steps=4 format=3 uid="uid://dyc3kseph4el7"]
[ext_resource type="Texture2D" uid="uid://b3qm246m7pnsx" path="res://assets/Logo_V2.png" id="2_gd222"]
[ext_resource type="Script" uid="uid://kmubk5a6i385" path="res://discord_connector.gd" id="3_h2yge"]
[ext_resource type="Script" uid="uid://46tue7u6crd6" path="res://addons/discord-rpc-gd/nodes/debug.gd" id="6_ujijw"]
[sub_resource type="SpriteFrames" id="SpriteFrames_h2yge"]
[node name="Node" type="Node"]
[node name="ColorRect" type="ColorRect" parent="."]
@@ -56,9 +54,9 @@ root_connector = NodePath("..")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(789, 330.5)
scale = Vector2(0.408203, 0.408203)
sprite_frames = SubResource("SpriteFrames_h2yge")
[connection signal="connection_error" from="DiscordConnector" to="DiscordConnector" method="_on_connection_error"]
[connection signal="connection_ready" from="DiscordConnector" to="DiscordConnector" method="_on_connection_ready"]
[connection signal="user_connected" from="DiscordConnector" to="DiscordConnector" method="_on_user_connected"]
[connection signal="user_connection_failed" from="DiscordConnector" to="DiscordConnector" method="_on_user_connection_failed"]
[connection signal="user_update_failed" from="DiscordConnector" to="DiscordConnector" method="_on_user_update_failed"]
[connection signal="user_updated" from="DiscordConnector" to="DiscordConnector" method="_on_user_updated"]

View File

@@ -1,3 +1,4 @@
[gd_resource type="Compositor" format=3 uid="uid://cbg8e12ms0vvc"]
[resource]
compositor_effects = Array[CompositorEffect]([null])