Browse Source

Throw exception with CustomStatus

pull/1774/head
Paulo 4 years ago
parent
commit
14477aee01
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.WebSocket/DiscordSocketClient.cs

+ 2
- 0
src/Discord.Net.WebSocket/DiscordSocketClient.cs View File

@@ -450,6 +450,8 @@ namespace Discord.WebSocket
/// </example>
public override async Task SetGameAsync(string name, string streamUrl = null, ActivityType type = ActivityType.Playing)
{
if (type == ActivityType.CustomStatus)
throw new InvalidOperationException("Only user accounts can use CustomStatus as their activity.");
if (!string.IsNullOrEmpty(streamUrl))
Activity = new StreamingGame(name, streamUrl);
else if (!string.IsNullOrEmpty(name))


Loading…
Cancel
Save