Beispiel #1
0
        public static IReadOnlyCollection <ChatMessage> GetMessages(this ISimpleChannel channel, int count = -1, RequestOptions options = null)
        {
            var client = channel.Client as TwitchChatClient;

            if (client == null)
            {
                return(null);
            }

            return(client.ApiClient.GetMessages(channel.Id, count));
        }
Beispiel #2
0
        // Channels
        public static async Task JoinAsync(this ISimpleChannel channel, RequestOptions options = null)
        {
            var client = channel.Client as TwitchChatClient;

            if (client == null)
            {
                return;
            }

            await client.ApiClient.JoinChannelAsync(channel.Name, options).ConfigureAwait(false);
        }
Beispiel #3
0
        // Messages
        public static async Task SendMessageAsync(this ISimpleChannel channel, string content, RequestOptions options = null)
        {
            var client = channel.Client as TwitchChatClient;

            if (client == null)
            {
                return;
            }

            await client.ApiClient.SendChannelMessageAsync(channel.Name, content, options).ConfigureAwait(false);
        }
 public bool Equals(ISimpleChannel other)
 => Id == other.Id;