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: prevent command #51

Open
dmyna opened this issue Jan 1, 2025 · 0 comments
Open

feat: prevent command #51

dmyna opened this issue Jan 1, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@dmyna
Copy link
Member

dmyna commented Jan 1, 2025

Use:

/prevent <user> [create_topcase (default: false)] [limit (default: by_initial_setup)]

Then:

  • iFhany will timeout the user with a prefixed time

  • A PunishmentListener will listen to any punishment during this period

  • A message will be sent to a default public log channel and to user's DM, warning that a preventive and temporary measure was taken.

    • This message can't have a case_number, it will only be added if PunishmentListener identifies a definitive punishment.
    • If any measure was taken in the prefixed time:
      • Delete the public message
      • Send in DM the result
  • If create_topcase is true, the command will call topcases feature (feat: topcases system #47 and feat: thread handler #50)

@dmyna dmyna added enhancement New feature or request help wanted Extra attention is needed labels Jan 1, 2025
@dmyna dmyna added this to the v2.0.0 milestone Jan 1, 2025
@dmyna dmyna pinned this issue Jan 2, 2025
dmyna added a commit that referenced this issue Feb 6, 2025
* build: fix wrong merge comments

* refactor: type autoreport `chat`/`chatLog` correctly

* refactor: use `SlashCommandOptionsOnlyBuilder` and `SlashCommandSubcommandsOnlyBuilder` for correct `data` function types

* refactor: remove deprecated `SlashCommandBuilder` option

* refactor: add type checking for `PartialGroupDMChannel` to avoid errors with `awaitMessages` method

* build: fix incorrect typedoc version

* build: add postinstall script to ensure `prisma generate` runs on some hosts

* fix: reaction id/name not being filtered

* fix: allow `console.log` logging for prod environment

* fix: activate `PresetHandler.InicializateAll()` and implement it

* feat: add new config models to schema (#9)

* fix: implement no implemented case to autoreport autocomplete (#9)

* refactor: remove unnecessary imports from `PresetHandler`

* feat: prepare `PermissionsHandler` to use Prisma instead json files (#9)

* feat: implement `PermissionsHandler` alterations (#9)

* feat: base code of new `config` command (#9)

* fix: put correct _id mapping for `CommandPermissions` model (#9)

* fix: configure correctly `EnsureCommandsPermissions` and `AllowedRoles` (#9)

* feat: allow guild owner to use `config` command without prior permissions (#9)

* feat: implement `command-permissions` subcommand to`config` command (#9)

* refactor: rename commands `mod` folder to `moderation`

* feat: create base Rust code and modules (#38)

* build: add Cargo files

* build: add /target to .gitignore

* chore: configure codelldb debug entry

* refactor: add basic EventHandler (#38)

* feat(handler): create `new` implementation to `Error` trait (#42)

* feat(commands): improve `ping` command with gateway info

* refactor(commands): add base of `kick` command (#41)

* build(deps): add chrono and strum_macros as deps

* refactor(database): implement prisma in Rust (#40)

* refactor(database): implement `PunishmentHandler` add method in Rust (#40)

* refactor(commands): implement kick command in Rust (#41)

* chore: add `default-run`script

* refactor(database): change prisma client provider (#40)

* build(deps): add `regex`

* refactor(utils): refactor `emojiFormat` and `customEmoji` in Rust (#42)

* test(utils): rewrite `customEmoji` and `emojiFormat` tests in Rust (#42)

* chore(docker): rewrite `Dockerfile` and `docker-compose.yml` to cover Rust refactoring (#42)

* chore(scripts): create `dev` script` and rewrite `on-container_dev-init` to cover Rust refactoring (#42)

* chore: add docker script for development on Windows

* chore: remove useless lines from gitignore

* refactor(utils): refactor `limitToMili` in Rust (#42)

* test(utils): create unitary tests to `limit_to_milli` (#42)

* chore(vscode): create debug entry to Rust debbuging with codelldb

* feat: implement internationalization (#3)

* feat: extract the remaining strings from the Rust code (#3)

* build(deps): add strum

* chore: implement Rust to the dev environment (#44)

* feat: add supported locales (#52)

* feat: implement i18n handler (#52)

* feat(locales): add current locale strings (#52)

* feat(command): prevent command base (#51)

* refactor: create alias module

---------

Co-authored-by: Vitor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants