private static string GetEventName(RpcGlobalEvent rpcEvent) { switch (rpcEvent) { case RpcGlobalEvent.ChannelCreated: return("CHANNEL_CREATE"); case RpcGlobalEvent.GuildCreated: return("GUILD_CREATE"); case RpcGlobalEvent.VoiceSettingsUpdated: return("VOICE_SETTINGS_UPDATE"); default: throw new InvalidOperationException($"Unknown RPC Global Event: {rpcEvent}"); } }
public async Task UnsubscribeGlobal(RpcGlobalEvent evnt, RequestOptions options = null) { await ApiClient.SendGlobalUnsubscribeAsync(GetEventName(evnt), options).ConfigureAwait(false); }