From e020b328c626b0cc3fde5f4f57886c68dc1eb371 Mon Sep 17 00:00:00 2001 From: Noikoio Date: Wed, 9 Aug 2017 19:29:45 -0700 Subject: [PATCH] Added new (unfinished) classes Will begin development of AutoRespond first. A (planned) feature list was added in the Feature class's documentation. --- Feature/AutoMod/AutoMod.cs | 31 ++++++++++++++++++++++++ Feature/AutoRespond/AutoRespond.cs | 39 ++++++++++++++++++++++++++++++ RegexBot.cs | 5 ++-- 3 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 Feature/AutoMod/AutoMod.cs create mode 100644 Feature/AutoRespond/AutoRespond.cs diff --git a/Feature/AutoMod/AutoMod.cs b/Feature/AutoMod/AutoMod.cs new file mode 100644 index 0000000..bc60378 --- /dev/null +++ b/Feature/AutoMod/AutoMod.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using Discord.WebSocket; +using Newtonsoft.Json.Linq; + +namespace Noikoio.RegexBot.Feature.AutoMod +{ + /// + /// Implements per-message regex matching and executes customizable responses. + /// The name RegexBot comes from the existence of this feature. + /// + /// Strictly for use as a moderation tool only. Triggers that respond only to messages + /// should be configured using . + /// + class AutoMod : BotFeature + { + public override string Name => "AutoMod"; + + public AutoMod(DiscordSocketClient client) : base(client) + { + throw new NotImplementedException(); + } + + public override Task ProcessConfiguration(JToken configSection) + { + throw new NotImplementedException(); + } + } +} diff --git a/Feature/AutoRespond/AutoRespond.cs b/Feature/AutoRespond/AutoRespond.cs new file mode 100644 index 0000000..0a4c8bd --- /dev/null +++ b/Feature/AutoRespond/AutoRespond.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Threading.Tasks; +using Discord.WebSocket; +using Newtonsoft.Json.Linq; + +namespace Noikoio.RegexBot.Feature.AutoRespond +{ + /// + /// Similar to , but lightweight. + /// Provides the capability to define autoresponses for fun or informational purposes. + /// + /// The major differences between this and include: + /// + /// Does not listen for message edits. + /// Moderators are not exempt from any defined triggers by default. + /// Responses are limited to only two types, and only one is allowed per rule. + /// Does not support fine-grained matching options. + /// Support for rate limiting. + /// + /// + /// + class AutoRespond : BotFeature + { + public override string Name => "AutoRespond"; + + public AutoRespond(DiscordSocketClient client) : base(client) + { + throw new NotImplementedException(); + } + + [ConfigSection("autoresponses")] + public override Task ProcessConfiguration(JToken configSection) + { + throw new NotImplementedException(); + } + } +} diff --git a/RegexBot.cs b/RegexBot.cs index 4efbb7f..9ad5d9d 100644 --- a/RegexBot.cs +++ b/RegexBot.cs @@ -44,8 +44,9 @@ namespace Noikoio.RegexBot // Initialize features _features = new BotFeature[] { - new Feature.RegexResponder.EventProcessor(_client), - new Feature.ModTools.CommandListener(_client) + new Feature.AutoMod.AutoMod(_client), + new Feature.ModTools.CommandListener(_client), + new Feature.AutoRespond.AutoRespond(_client) }; var dlog = Logger.GetLogger("Discord.Net"); _client.Log += async (arg) =>