added activity image keys and text
This commit is contained in:
Binary file not shown.
@@ -1,9 +1,10 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
func _ready():
|
func _ready():
|
||||||
DiscordSDK.app_id = 918857075105349632
|
DiscordSDK.debug()
|
||||||
DiscordSDK.details = "Made with GDExtension"
|
#DiscordSDK.app_id = 918857075105349632
|
||||||
DiscordSDK.state = "This is a test from GDScript in Godot 4"
|
#DiscordSDK.details = "Made with GDExtension"
|
||||||
|
#DiscordSDK.state = "This is a test from GDScript in Godot 4"
|
||||||
|
|
||||||
DiscordSDK.refresh()
|
#DiscordSDK.refresh()
|
||||||
$Info.text = $Info.text.replace("{id}",str(DiscordSDK.app_id)).replace("{details}",DiscordSDK.details).replace("{state}",DiscordSDK.state)
|
#$Info.text = $Info.text.replace("{id}",str(DiscordSDK.app_id)).replace("{details}",DiscordSDK.details).replace("{state}",DiscordSDK.state)
|
||||||
|
@@ -53,9 +53,10 @@ void DiscordSDK::debug()
|
|||||||
discord::Activity debugactivity{};
|
discord::Activity debugactivity{};
|
||||||
debugactivity.SetState("Test from Godot!");
|
debugactivity.SetState("Test from Godot!");
|
||||||
debugactivity.SetDetails("I worked months on this");
|
debugactivity.SetDetails("I worked months on this");
|
||||||
discord::ActivityAssets debugassets = debugactivity.GetAssets();
|
debugactivity.GetAssets().SetLargeImage("test1");
|
||||||
debugassets.SetLargeImage("test1");
|
debugactivity.GetAssets().SetLargeText("wow test text for large image");
|
||||||
debugassets.SetSmallImage("godot");
|
debugactivity.GetAssets().SetSmallImage("godot");
|
||||||
|
debugactivity.GetAssets().SetSmallText("wow test text for small image");
|
||||||
core->ActivityManager().UpdateActivity(debugactivity, [](discord::Result debugresult) {});
|
core->ActivityManager().UpdateActivity(debugactivity, [](discord::Result debugresult) {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user