示例#1
0
        /// <summary>
        /// Add a mod/broadcaster quote
        /// </summary>
        /// <param name="chatter"></param>
        private async Task <DateTime> AddQuoteAsync(TwitchChatter chatter)
        {
            try
            {
                string quote = chatter.Message.Substring(chatter.Message.IndexOf(" ") + 1);

                await _quote.AddQuoteAsync(quote, chatter.DisplayName, _broadcasterInstance.DatabaseId);

                _irc.SendPublicChatMessage($"Quote has been created @{chatter.DisplayName}");
            }
            catch (Exception ex)
            {
                await _errHndlrInstance.LogError(ex, "QuoteFeature", "AddQuote(TwitchChatter)", false, "!addquote");
            }

            return(DateTime.Now);
        }