예제 #1
0
 private async Task OnChatStarting(dynamic dyn)
 {
     //Init Antiflood
     ChatInitContext chatInitCtx = new ChatInitContext(_messagesSource);
     await _chatEventHandler?.RunEventHandler(eh => eh.OnInit(chatInitCtx), ex =>
     {
         _log.Log(LogLevel.Warn, _logCategory, $"Failed when [chatService] try to load chatEventHandler", new {});
     });
 }
예제 #2
0
 public async Task OnInit(ChatInitContext ctx)
 {
     SpamHandler(ctx.Messages);
     await Task.CompletedTask;
 }