From 14477aee0188e05eca30ff901a43a62f86c5364f Mon Sep 17 00:00:00 2001 From: Paulo Date: Sat, 6 Feb 2021 03:09:56 -0300 Subject: [PATCH] Throw exception with CustomStatus --- src/Discord.Net.WebSocket/DiscordSocketClient.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index b43db5d98..7e0576b22 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -450,6 +450,8 @@ namespace Discord.WebSocket /// 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))