implemented rich presences and better naming

This commit is contained in:
2025-03-27 15:22:43 +01:00
parent bd7a102d3d
commit 98a4b4783c
12 changed files with 209 additions and 217 deletions

View File

@@ -1,17 +1,16 @@
extends DiscordConnector
func _on_user_connected(access_token: String, refresh_token: String, expires_in: int) -> void:
@onready var discord_activity: DiscordActivity = $DiscordActivity
func _on_authenticated(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_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")
$DiscordLobby.create_or_join_lobby("beanis")
func _on_authentication_failed(error: String) -> void:
push_error("Auth failed! Error: " + error)
func _on_connection_error(error: String) -> void:
push_error(error)
func _on_connection_ready() -> void:
print_debug("CONNECTION READY")
discord_activity.update_rich_presence()