internal Task RemoveBitsReceivedAsync(RestTokenInfo info) { string topic = $"whispers.{info.UserId}"; var request = new PubsubRequest("UNLISTEN") .WithData(info.Token, topic); return(SendAsync(request)); }
internal Task RemoveWhisperAsync(RestTokenInfo info) { if (!info.Authorization?.Scopes.Contains("chat_login") ?? false) { throw new MissingScopeException("chat_login"); } string topic = $"whispers.{info.UserId}"; var request = new PubsubRequest("UNLISTEN") .WithData(info.Token, topic); return(SendAsync(request)); }
public async Task ConnectAsync(RestTokenInfo auth) { await _chat.ConnectAsync(); await _chat.AuthorizeAsync(auth.Username, auth.Token); if (_config.RequestTags) { await _chat.RequestTagsAsync().ConfigureAwait(false); } if (_config.RequestCommands) { await _chat.RequestCommandsAsync().ConfigureAwait(false); } if (_config.RequestMembership) { await _chat.RequestMembershipAsync().ConfigureAwait(false); } }