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: command stuff #19

Merged
merged 14 commits into from
Oct 26, 2021
Merged

feat: command stuff #19

merged 14 commits into from
Oct 26, 2021

Conversation

WilsontheWolf
Copy link
Member

@WilsontheWolf WilsontheWolf commented Sep 20, 2021

This pr is a wip

features:

  • Load mod commands
  • Run mod commands
  • Error handling
  • Example ping command
  • Warn
  • Penalize
  • Timeout
  • Purge
  • Move
  • Nickname commands
    • Edit
    • Reset
  • Auto Response Commands
    • Create
    • Delete
    • List
    • View
    • Title - Set the title of an auto response
    • Response - Set the response of an auto response
    • Trigger
      • Add
      • Remove
    • Note some of these might be sub-commands

Closes #1

@WilsontheWolf WilsontheWolf self-assigned this Sep 20, 2021
@WilsontheWolf WilsontheWolf changed the title feat: base command handler stuff feat: command stuff Sep 20, 2021
@KommentatorForAll
Copy link
Member

i wouldn't merge it into main, especially as you didn't implement all commands yet.
I'd recommend branching off of here and continuing the work on subbranches if that was your intention.
Else, eveything looks fine so far.

@WilsontheWolf
Copy link
Member Author

Yeah I stated that this pr is wip in the initial comment and will probably be adding to it later. I can't mark it as a draft pr (probably cause we on a private repo) but it still will be pushed to later.

src/config.js Outdated Show resolved Hide resolved
src/modules/modCommands/module.js Outdated Show resolved Hide resolved
src/modules/modCommands/processCommands.js Outdated Show resolved Hide resolved
src/modules/modCommands/processCommands.js Outdated Show resolved Hide resolved
src/modules/modCommands/processCommands.js Outdated Show resolved Hide resolved
@WilsontheWolf
Copy link
Member Author

Sorry, I don't know how to properly use git I guess I duplicated my commits ?

Copy link
Member

@KommentatorForAll KommentatorForAll left a comment

Choose a reason for hiding this comment

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

Looks mostly fine, added a few things that you could look into, also please finish all commands first, before doing a pr to main. It's ok, if you pr into this branch for each command (block) but not a pr to main for each command

src/modules/modCommands/commands/ping.js Show resolved Hide resolved
src/modules/modCommands/module.js Show resolved Hide resolved
src/modules/modCommands/processCommands.js Show resolved Hide resolved
Load mod commands
Run mod commands
Error handling
Example ping command
Add prefix to .env
Subscribe directly to commands
Properly set the module.
This adds mod tools to the bot. Particularly penalize, warn, help, offences
Added timeout mod command
Merged with master.
Added a stringifyTimestamp to make a timestamp to a discord markdown timestamp
Purge a number of messages or messages after an id.
Also removes xp from purged messages.
Added move command.
Made purge command delete the message that activated it.
Added a fetchChannel function to util to get a channel from id or mention.
Mod's can set and reset nicknames.
Clean nickname func added to modUtil.
I am the large stupid.
Added command.
Added titles to auto responses.
Fixed a typo in the emotes constant.
Made a make Title function in util.
Made auto response handler able to handle mixed types.
Allowed auto responses to be created with response and title.
Allowing adding regex triggers.
Allow removing regex triggers.
Show triggers in preview.
src/dto/OffenceDto.js Outdated Show resolved Hide resolved
src/dto/UserDto.js Outdated Show resolved Hide resolved
src/modUtil.js Show resolved Hide resolved
src/modUtil.js Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/move.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/move.js Show resolved Hide resolved
src/modules/modCommands/commands/move.js Show resolved Hide resolved
src/modules/modCommands/commands/nickname.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/nickname.js Outdated Show resolved Hide resolved
src/dto/OffenceDto.js Outdated Show resolved Hide resolved
src/dto/UserDto.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/warn.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/timeout.js Show resolved Hide resolved
src/modules/modCommands/commands/warn.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/help.js Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
src/dto/UserDto.js Show resolved Hide resolved
src/modules/modCommands/commands/autoresponse.js Outdated Show resolved Hide resolved
WilsontheWolf and others added 3 commits October 25, 2021 15:58
Co-authored-by: Commentator2.0 <[email protected]>
This reverts commit 1a0ca5f.
The formatter didn't like it.
Copy link
Member

@KommentatorForAll KommentatorForAll left a comment

Choose a reason for hiding this comment

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

seems fine now? maybe let @Chicken take another look over this too

@WilsontheWolf WilsontheWolf merged commit f41e41e into main Oct 26, 2021
@WilsontheWolf WilsontheWolf deleted the feature/commands branch October 26, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants