Skip to content

Commit

Permalink
Merge Rust refactoring into master (#53)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dmyna and tokkitomare authored Feb 6, 2025
1 parent 67f1a2b commit e133d0c
Show file tree
Hide file tree
Showing 65 changed files with 7,003 additions and 685 deletions.
45 changes: 4 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,11 @@ lib-cov
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo
Expand All @@ -57,12 +41,6 @@ web_modules/
# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

Expand All @@ -79,24 +57,6 @@ web_modules/
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
t

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

Expand Down Expand Up @@ -125,4 +85,7 @@ discloud.config
configs.json

scripts/personal
config/default/permissions.json
config/default/permissions.json

/target
/src/prisma.rs
39 changes: 39 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,45 @@
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
]
},
{
"name": "Test (Rust)",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"test",
"--no-run"
]
},
"args": [],
"cwd": "${workspaceFolder}",
},
{
"name": "Run (Rust)",
"type": "lldb",
"request": "launch",
"cargo": {
"args": [
"build",
"--bin=ifhany",
"--package=ifhany"
],
"filter": {
"name": "ifhany",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}",
},
{
"name": "Attach (Rust)",
"type": "lldb",
"request": "attach",
"pid": "${command:pickMyProcess}",
"program": "${workspaceFolder}/target/debug/ifhany",
"sourceLanguages": ["rust"]
}
]
}
Loading

0 comments on commit e133d0c

Please sign in to comment.