Exemplo n.º 1
0
 private IEnumerable <ResponseMessage> StopPingingHandler(IncomingMessage message, string matchedHandle)
 {
     if (_pingPlugin.StopPingingUser(message.UserId))
     {
         yield return(message.ReplyToChannel($"Ok, I will stop pinging @{message.Username}"));
     }
     else
     {
         yield return(message.ReplyToChannel($"BUT I AM NOT PINGING @{message.Username}"));
     }
 }
Exemplo n.º 2
0
 private async IAsyncEnumerable <ResponseMessage> StopPingingHandler(IncomingMessage message, IValidHandle matchedHandle)
 {
     if (_pingPlugin.StopPingingUser(message.UserId))
     {
         yield return(await Task.FromResult(message.ReplyToChannel($"Ok, I will stop pinging @{message.Username}")));
     }
     else
     {
         yield return(message.ReplyToChannel($"BUT I AM NOT PINGING @{message.Username}"));
     }
 }