public OnMessage(DiscordSocketClient client) { _client = client; _massMentionControl = new MassMentionControl(); _inviteLinkPreventation = new InviteLinkPreventation(); _nounTest = new Nountest(); }
private async Task NountestCheck(SocketCommandContext context) { try { if (!string.IsNullOrWhiteSpace(context.Message.Content)) { if (!await WordFilter.CheckForNaughtyWords(context.Message.Content)) { if (Nountest.CheckForNountest(context.Message.Content.Split(" ")[0])) { await _nounTest.PostNounTest(context); } } } } catch (Exception ex) { await ExceptionHandler.HandleExceptionQuietly(GetType().FullName, ExceptionHandler.GetAsyncMethodName(), ex); } }