-
-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I wasn't able to reopen issue #261 so i created a new bug report instead.
Versions tested
version | Result |
---|---|
1.0.175 | Large/small image assets stay visible after countless UpdatePartySize calls |
1.5.x ->1.5.0.51 | Image assets disappear after a few party-size updates |
On 1.5.x the image assets vanish after a few updates, leaving only text. No errors are thrown; Discord simply stops showing the image. Rolling back to 1.0.175 restores correct behaviour.
here is a basic console app sample
internal class Program
{
private const string ClientId = "DISCORD_RPC_TOKEN";
private static DiscordRpcClient _client;
private static Timer _partyTimer;
private static readonly Random _rng = new();
static void Main()
{
_client = new DiscordRpcClient(ClientId)
{
Logger = new FileLogger("discord_rpc.log")
{
Level = LogLevel.Trace,
}
};
_client.Initialize();
_client.SetPresence(new RichPresence
{
Details = "Testing RPC Bug",
State = "Waiting image to dissapear…",
Timestamps = Timestamps.Now,
Assets = new Assets
{
LargeImageKey = "https://i.imgur.com/VxYHUTk.gif",
SmallImageKey = "https://i.imgur.com/VxYHUTk.gif",
},
Party = new Party
{
ID = Guid.NewGuid().ToString(),
Size = 1,
Max = 100,
},
});
_partyTimer = new Timer(UpdatePartySize, null, TimeSpan.Zero, TimeSpan.FromSeconds(10));
Console.WriteLine("RPC running – press any key to exit…");
Console.ReadKey();
_partyTimer.Dispose();
_client.ClearPresence();
_client.Dispose();
}
private static void UpdatePartySize(object _)
{
try
{
int newSize = _rng.Next(1, 100);
/*
* After a few party-size updates, the image assets vanishes from the Rich Presence.
* The issue appears only in versions **newer than 1.0.175**—that version (and earlier) retains the image without problems.
* 1.0.175 works, when switching to version 1.5.0.51 you will see the images vanishes.
*/
_client.UpdatePartySize(newSize, 100);
Console.WriteLine($"Party size → {newSize}/100");
}
catch (Exception ex)
{
Console.WriteLine($"[RPC error] {ex.Message}");
}
}
}
- OS: WIndows 10
- Framework: dotnet 8.0
- Library Version: working 1.0.175. with issue 1.5.x
Logs
the code provides a log file, i didn't find anything usefull
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working