Remove extraneous comments and reminders

This commit is contained in:
Noi 2022-07-28 14:09:52 -07:00
parent 52d3b1b9d4
commit 724f35fea6
5 changed files with 1 additions and 7 deletions

View file

@ -44,7 +44,7 @@ public class CachedGuildMessage {
public DateTimeOffset? EditedAt { get; set; } public DateTimeOffset? EditedAt { get; set; }
/// <summary> /// <summary>
/// Gets a list of file names thata were attached to this message. /// Gets a list of file names that were attached to this message.
/// </summary> /// </summary>
public List<string> AttachmentNames { get; set; } = null!; public List<string> AttachmentNames { get; set; } = null!;

View file

@ -1,7 +1,6 @@
using System.Diagnostics; using System.Diagnostics;
namespace RegexBot.Modules.AutoResponder; namespace RegexBot.Modules.AutoResponder;
/// <summary> /// <summary>
/// Provides the capability to define text responses to pattern-based triggers for fun or informational /// Provides the capability to define text responses to pattern-based triggers for fun or informational
/// purposes. Although in essence similar to <see cref="RegexModerator.RegexModerator"/>, it is a better /// purposes. Although in essence similar to <see cref="RegexModerator.RegexModerator"/>, it is a better
@ -20,7 +19,6 @@ internal class AutoResponder : RegexbotModule {
if (config.Type != JTokenType.Array) if (config.Type != JTokenType.Array)
throw new ModuleLoadException(Name + " configuration must be a JSON array."); throw new ModuleLoadException(Name + " configuration must be a JSON array.");
// TODO better error reporting during this process
foreach (var def in config.Children<JObject>()) foreach (var def in config.Children<JObject>())
defs.Add(new Definition(def)); defs.Add(new Definition(def));

View file

@ -2,7 +2,6 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace RegexBot.Modules.AutoResponder; namespace RegexBot.Modules.AutoResponder;
/// <summary> /// <summary>
/// Representation of a single <see cref="AutoResponder"/> configuration definition. /// Representation of a single <see cref="AutoResponder"/> configuration definition.
/// </summary> /// </summary>
@ -28,7 +27,6 @@ class Definition {
// Regex // Regex
var opts = RegexOptions.Compiled | RegexOptions.CultureInvariant; var opts = RegexOptions.Compiled | RegexOptions.CultureInvariant;
// TODO consider adding an option to specify Singleline and Multiline mode. Defaulting to Singleline.
// Reminder: in Singleline mode, all contents are subject to the same regex (useful if e.g. spammer separates words line by line) // Reminder: in Singleline mode, all contents are subject to the same regex (useful if e.g. spammer separates words line by line)
opts |= RegexOptions.Singleline; opts |= RegexOptions.Singleline;
// IgnoreCase is enabled by default; must be explicitly set to false // IgnoreCase is enabled by default; must be explicitly set to false

View file

@ -41,7 +41,6 @@ internal class ModCommands : RegexbotModule {
if (cfg.Commands.TryGetValue(cmdchk, out var c)) { if (cfg.Commands.TryGetValue(cmdchk, out var c)) {
try { try {
await c.Invoke(g, arg); await c.Invoke(g, arg);
// TODO Custom post-invocation log messages? Not by the user, but by the command.
Log($"[{g.Name}] {c.Command} invoked by {arg.Author} in #{arg.Channel.Name}."); Log($"[{g.Name}] {c.Command} invoked by {arg.Author} in #{arg.Channel.Name}.");
} catch (Exception ex) { } catch (Exception ex) {
Log($"Unhandled exception while processing '{c.Label}':\n" + ex.ToString()); Log($"Unhandled exception while processing '{c.Label}':\n" + ex.ToString());

View file

@ -41,7 +41,6 @@ class ConfDefinition {
// Regex loading // Regex loading
var opts = RegexOptions.Compiled | RegexOptions.CultureInvariant; var opts = RegexOptions.Compiled | RegexOptions.CultureInvariant;
// TODO consider adding an option to specify Singleline and Multiline mode. Defaulting to Singleline.
// Reminder: in Singleline mode, all contents are subject to the same regex (useful if e.g. spammer separates words line by line) // Reminder: in Singleline mode, all contents are subject to the same regex (useful if e.g. spammer separates words line by line)
opts |= RegexOptions.Singleline; opts |= RegexOptions.Singleline;
// IgnoreCase is enabled by default; must be explicitly set to false // IgnoreCase is enabled by default; must be explicitly set to false