Allow setting custom status with SetGameAsync (#2858)

This commit is contained in:
Mihail Gribkov
2024-02-23 00:02:57 +03:00
committed by GitHub
parent 6256de42bc
commit ee386b1a15

View File

@@ -721,7 +721,12 @@ namespace Discord.WebSocket
if (!string.IsNullOrEmpty(streamUrl)) if (!string.IsNullOrEmpty(streamUrl))
Activity = new StreamingGame(name, streamUrl); Activity = new StreamingGame(name, streamUrl);
else if (!string.IsNullOrEmpty(name)) else if (!string.IsNullOrEmpty(name))
{
if (type is ActivityType.CustomStatus)
Activity = new CustomStatusGame(name);
else
Activity = new Game(name, type); Activity = new Game(name, type);
}
else else
Activity = null; Activity = null;
return SendStatusAsync(); return SendStatusAsync();