Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Jobs/Tasks + Moderation Overhaul #44

Open
wants to merge 71 commits into
base: master
Choose a base branch
from

Conversation

sustained
Copy link
Collaborator

@sustained sustained commented Jan 2, 2020

PR

  • Rename jobs to tasks
  • Add services/tasks - Persist task options/configuration
    • If the DB is empty, create it based on the defaults in the task classes
    • If a new task is created, add it to the DB
  • Add !error command, necessary for testing tasks/log
  • Refactor ban-words service to moderation service - supports various different actions
  • Add commands for managing moderation triggers
    • !add-trigger <action=warn|kick|ban|notify> <trigger> - Add a trigger word/phrase
    • !remove-trigger <trigger> - Remove a trigger word/phrase
    • !list-triggers - List all triggers
  • Update/improve commands for managing tasks
    • !enable-task <task-name> - Enable a task
    • !disable-task <task-name> - Disable a task
    • !task-info <task-name> - Show in-depth information about a task
    • !list-tasks - Show all tasks and their status (enabled/disabled)
    • !reset-tasks - Reset all tasks to their default configurations
  • Improve tasks
    • LogTask
      • Logs various events (command errors, unknown commands, successful invocations etc.)
      • All is configurable (which things should be logged and where)
    • BanTask -> ModerationTask
      • Refactor to ModerationTask - now supports kicks, bans, warns & notifications
  • Add Task argument type
  • General refactoring
    • Various improvements (inc. comments) to task- and moderation-related files
    • Several iterations of misc. code clean up (DRY etc.)

Miscellaneous

I need to stop doing miscellaneous changes in random PRs, I know. But if I see an issue my immediate instinct is just to fix it there and then. 😦

  • Fix NODE_ENV issue.
  • Fix development-only commands in production.
  • Fix some unnecessary duplication in constants files.
  • Fix a small issue with trySend message util.

@sustained sustained modified the milestones: 0.2, 0.3 Jan 6, 2020
}

if (options.guildOnly && options.dmOnly) {
console.warn('Conflicting options - guildOnly and warnOnly.')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant