Skip to content

Commit

Permalink
Allow setting custom status with SetGameAsync (#2858)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 authored Feb 22, 2024
1 parent 6256de4 commit ee386b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Discord.Net.WebSocket/DiscordSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,12 @@ public override Task SetGameAsync(string name, string streamUrl = null, Activity
if (!string.IsNullOrEmpty(streamUrl))
Activity = new StreamingGame(name, streamUrl);
else if (!string.IsNullOrEmpty(name))
Activity = new Game(name, type);
{
if (type is ActivityType.CustomStatus)
Activity = new CustomStatusGame(name);
else
Activity = new Game(name, type);
}
else
Activity = null;
return SendStatusAsync();
Expand Down

0 comments on commit ee386b1

Please sign in to comment.