diff options
| -rw-r--r-- | .github/workflows/ci.yaml | 4 | ||||
| -rw-r--r-- | .github/workflows/clippy.yaml | 3 | ||||
| -rw-r--r-- | .github/workflows/docker.yaml | 3 | ||||
| -rw-r--r-- | Cargo.lock | 551 | ||||
| -rw-r--r-- | Cargo.toml | 22 | ||||
| -rw-r--r-- | LICENSE | 2 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | flake.nix | 13 | ||||
| -rw-r--r-- | nix/containerize.nix | 8 | ||||
| -rw-r--r-- | nix/module.nix | 24 | ||||
| -rw-r--r-- | nix/package.nix | 6 | ||||
| -rw-r--r-- | src/commands/general/version.rs | 2 | ||||
| -rw-r--r-- | src/http/mod.rs | 2 |
13 files changed, 393 insertions, 253 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 68f9f35..dc3b7e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,10 +39,6 @@ jobs: if: ${{ matrix.use-nix }} uses: "cachix/install-nix-action@v30" - - name: "Setup Nix cache" - if: ${{ matrix.use-nix }} - uses: "DeterminateSystems/magic-nix-cache-action@v8" - - name: "Install Rust" if: ${{ !matrix.use-nix }} uses: "actions-rust-lang/setup-rust-toolchain@v1" diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml index 138e418..778ba74 100644 --- a/.github/workflows/clippy.yaml +++ b/.github/workflows/clippy.yaml @@ -37,9 +37,6 @@ jobs: - name: "Install Nix" uses: "cachix/install-nix-action@v30" - - name: "Setup Nix cache" - uses: "DeterminateSystems/magic-nix-cache-action@v8" - - name: "Run Clippy" id: "clippy-run" run: | diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e3e70e7..ff365ba 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -34,9 +34,6 @@ jobs: - name: "Install Nix" uses: "cachix/install-nix-action@v30" - - name: "Setup Nix cache" - uses: "DeterminateSystems/magic-nix-cache-action@v8" - - name: "Build Docker image" id: "build" env: @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" @@ -227,9 +227,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" [[package]] name = "camino" @@ -278,27 +278,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "chill" -version = "1.0.0" -dependencies = [ - "anyhow", - "bottomify", - "dotenvy", - "env_logger", - "log", - "poise", - "rand 0.8.5", - "redis 0.27.6", - "redis-macros", - "reqwest 0.12.9", - "serde", - "serde_json", - "tokio", - "url", - "uwurandom-rs", -] - -[[package]] name = "chrono" version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -470,36 +449,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] -name = "deadpool" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" -dependencies = [ - "deadpool-runtime", - "num_cpus", - "tokio", -] - -[[package]] -name = "deadpool-redis" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e081657a45476ddeefff90d0beb55446a50a77eb76b37387fbd6dd8f8e6210d" -dependencies = [ - "deadpool", - "redis 0.26.1", -] - -[[package]] -name = "deadpool-runtime" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" -dependencies = [ - "tokio", -] - -[[package]] name = "deranged" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -531,16 +480,21 @@ dependencies = [ ] [[package]] -name = "dotenvy" -version = "0.15.7" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] [[package]] -name = "either" -version = "1.13.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "encoding_rs" @@ -563,9 +517,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -646,9 +600,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -656,21 +610,21 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", @@ -679,21 +633,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -858,9 +812,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] name = "httpdate" @@ -900,9 +854,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.2.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", @@ -939,7 +893,7 @@ checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" dependencies = [ "futures-util", "http 1.1.0", - "hyper 1.2.0", + "hyper 1.6.0", "hyper-util", "rustls 0.23.7", "rustls-pki-types", @@ -951,20 +905,19 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.2.0", + "hyper 1.6.0", "pin-project-lite", "socket2 0.5.5", "tokio", - "tower", "tower-service", "tracing", ] @@ -993,6 +946,124 @@ dependencies = [ ] [[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] name = "ident_case" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1000,12 +1071,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1025,15 +1107,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] name = "itoa" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1050,9 +1123,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.150" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "linux-raw-sys" @@ -1061,6 +1134,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" [[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] name = "lock_api" version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1072,9 +1151,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" @@ -1135,6 +1214,27 @@ dependencies = [ ] [[package]] +name = "moyai-bot" +version = "1.0.0" +dependencies = [ + "anyhow", + "bottomify", + "dotenvy", + "env_logger", + "log", + "poise", + "rand 0.8.5", + "redis", + "redis-macros", + "reqwest 0.12.12", + "serde", + "serde_json", + "tokio", + "url", + "uwurandom-rs", +] + +[[package]] name = "num-bigint" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1169,16 +1269,6 @@ dependencies = [ ] [[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - -[[package]] name = "object" version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1267,26 +1357,6 @@ dependencies = [ ] [[package]] -name = "pin-project" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.87", -] - -[[package]] name = "pin-project-lite" version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1498,37 +1568,14 @@ dependencies = [ [[package]] name = "redis" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e902a69d09078829137b4a5d9d082e0490393537badd7c91a3d69d14639e115f" -dependencies = [ - "arc-swap", - "async-trait", - "bytes", - "combine", - "futures-util", - "itoa", - "num-bigint", - "percent-encoding", - "pin-project-lite", - "ryu", - "tokio", - "tokio-util", - "url", -] - -[[package]] -name = "redis" -version = "0.27.6" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d8f99a4090c89cc489a94833c901ead69bfbf3877b4867d5482e321ee875bc" +checksum = "e37ec3fd44bea2ec947ba6cc7634d7999a6590aca7c35827c250bc0de502bda6" dependencies = [ "arc-swap", - "async-trait", "bytes", "combine", "futures-util", - "itertools", "itoa", "num-bigint", "percent-encoding", @@ -1548,12 +1595,11 @@ dependencies = [ [[package]] name = "redis-macros" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90a7a4a7b88300d28a3251c64b5c74e57e46c0cd2238cce81ec0927793255e49" +checksum = "3b0b623a48ed8fdd13ea8b09f91f3b31811c4920a1ce49df63c1921a4e962cbb" dependencies = [ - "deadpool-redis", - "redis 0.27.6", + "redis", "redis-macros-derive", "serde", "serde_json", @@ -1561,9 +1607,9 @@ dependencies = [ [[package]] name = "redis-macros-derive" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48e124e31d75d8d8ab9a309df06c503c79aebf7b930c5284b9be884f35844d2" +checksum = "f90b78d636deebc0c28a1f75f6467def602be4f9caea89dba2d108b15bb81cfd" dependencies = [ "proc-macro2", "quote", @@ -1654,9 +1700,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "base64 0.22.0", "bytes", @@ -1665,7 +1711,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.2.0", + "hyper 1.6.0", "hyper-rustls 0.27.2", "hyper-util", "ipnet", @@ -1685,6 +1731,7 @@ dependencies = [ "sync_wrapper 1.0.1", "tokio", "tokio-rustls 0.26.0", + "tower", "tower-service", "url", "wasm-bindgen", @@ -1908,18 +1955,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -1928,9 +1975,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2071,6 +2118,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] name = "strsim" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2126,6 +2179,17 @@ dependencies = [ ] [[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] name = "system-configuration" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2226,6 +2290,16 @@ dependencies = [ ] [[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] name = "tinyvec" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2242,9 +2316,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.41.1" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -2259,9 +2333,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -2320,31 +2394,30 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper 1.0.1", "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2461,27 +2534,12 @@ dependencies = [ ] [[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] name = "unicode-segmentation" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2501,9 +2559,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -2518,6 +2576,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2914,7 +2984,86 @@ dependencies = [ ] [[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] @@ -1,8 +1,8 @@ [package] -name = "chill" +name = "moyai-bot" version = "1.0.0" edition = "2021" -repository = "https://github.com/getchoo/chill" +repository = "https://github.com/getchoo/moyai-bot" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -10,24 +10,24 @@ repository = "https://github.com/getchoo/chill" anyhow = "1.0" bottomify = "1.2.0" dotenvy = "0.15.7" -env_logger = "0.11.5" -log = "0.4.22" +env_logger = "0.11.6" +log = "0.4.25" poise = "0.6.1" rand = "0.8.5" -redis = { version = "0.27", features = ["tokio-comp", "tokio-rustls-comp"] } -redis-macros = "0.4" -reqwest = { version = "0.12.9", default-features = false, features = [ +redis = { version = "0.28", features = ["tokio-comp", "tokio-rustls-comp"] } +redis-macros = "0.5" +reqwest = { version = "0.12.12", default-features = false, features = [ "rustls-tls", "json", ] } -serde = "1.0.215" -serde_json = "1.0.133" -tokio = { version = "1.41.1", features = [ +serde = "1.0.217" +serde_json = "1.0.138" +tokio = { version = "1.43.0", features = [ "macros", "rt-multi-thread", "signal", ] } -url = { version = "2.5.2", features = ["serde"] } +url = { version = "2.5.4", features = ["serde"] } uwurandom-rs = "1.1.0" [lints.rust] @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 seth +Copyright (c) 2022-2025 Seth Flynn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -1,5 +1,5 @@ -# chill +# moyai-bot -[](https://github.com/getchoo/chill/actions/workflows/ci.yaml) +[](https://github.com/getchoo/moyai-bot/actions/workflows/ci.yaml) -okay so like basically, it's just a discord bot (so cool!!) +okay so like basically, it's just a discord bot 🗿 @@ -38,7 +38,7 @@ { clippy-sarif = pkgs.stdenv.mkDerivation { name = "check-clippy-sarif"; - inherit (self.packages.${system}.chill-discord-bot) src cargoDeps; + inherit (self.packages.${system}.moyai-discord-bot) src cargoDeps; nativeBuildInputs = [ pkgs.cargo @@ -99,8 +99,9 @@ pkgs.redis ]; - inputsFrom = [ self.packages.${system}.chill-discord-bot ]; - RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}"; + inputsFrom = [ self.packages.${system}.moyai-discord-bot ]; + + RUST_SRC_PATH = toString pkgs.rustPlatform.rustLibSrc; }; ci = pkgs.mkShell { @@ -111,7 +112,7 @@ self.formatter.${system} ]; - inputsFrom = [ self.packages.${system}.chill-discord-bot ]; + inputsFrom = [ self.packages.${system}.moyai-discord-bot ]; }; } ); @@ -138,9 +139,9 @@ static-x86_64 = staticWith { arch = "x86_64"; }; static-aarch64 = staticWith { arch = "aarch64"; }; - chill-discord-bot = pkgs.callPackage ./nix/package.nix { inherit self; }; + moyai-discord-bot = pkgs.callPackage ./nix/package.nix { inherit self; }; - default = self.packages.${system}.chill-discord-bot; + default = self.packages.${system}.moyai-discord-bot; } ); }; diff --git a/nix/containerize.nix b/nix/containerize.nix index b936b90..2be02ef 100644 --- a/nix/containerize.nix +++ b/nix/containerize.nix @@ -2,18 +2,18 @@ let containerize = - chill-discord-bot: + moyai-discord-bot: let - inherit (chill-discord-bot.passthru) crossPkgs; + inherit (moyai-discord-bot.passthru) crossPkgs; architecture = crossPkgs.go.GOARCH; in dockerTools.buildLayeredImage { - name = "chill-discord-bot"; + name = "moyai-discord-bot"; tag = "latest-${architecture}"; contents = [ dockerTools.caCertificates ]; - config.Cmd = [ (lib.getExe chill-discord-bot) ]; + config.Cmd = [ (lib.getExe moyai-discord-bot) ]; inherit architecture; }; in diff --git a/nix/module.nix b/nix/module.nix index 5062f5e..7ff7d62 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -19,17 +19,17 @@ let ; inherit (pkgs.stdenv.hostPlatform) system; - cfg = config.services.chill-discord-bot; + cfg = config.services.moyai-discord-bot; - defaultUser = "chill-discord-bot"; - flakePackages = self.packages.${system} or (throw "getchoo/chill: ${system} is not supported"); + defaultUser = "moyai-discord-bot"; + flakePackages = self.packages.${system} or (throw "getchoo/moyai-bot: ${system} is not supported"); in { - options.services.chill-discord-bot = { - enable = mkEnableOption "chill"; + options.services.moyai-discord-bot = { + enable = mkEnableOption "moyai-discord-bot"; - package = mkPackageOption flakePackages "chill-discord-bot" { }; + package = mkPackageOption flakePackages "moyai-discord-bot" { }; user = mkOption { description = '' @@ -77,30 +77,30 @@ in type = types.nullOr types.path; default = null; example = literalExpression '' - "/run/agenix.d/1/chillDiscordBot" + "/run/agenix.d/1/moyaiDiscordBot" ''; }; }; imports = [ - (lib.mkRenamedOptionModule [ "services" "teawiebot" ] [ "services" "chill-discord-bot" ]) + (lib.mkRenamedOptionModule [ "services" "teawiebot" ] [ "services" "moyai-discord-bot" ]) ]; config = mkIf cfg.enable { services.redis.servers = mkIf (cfg.redisUrl == "local") { - chill-discord-bot = { + moyai-discord-bot = { enable = true; inherit (cfg) user; port = 0; # disable tcp listener }; }; - systemd.services.chill-discord-bot = { + systemd.services.moyai-discord-bot = { enable = true; wantedBy = [ "multi-user.target" ]; after = [ "network.target" - ] ++ optionals (cfg.redisUrl == "local") [ "redis-chill-discord-bot.service" ]; + ] ++ optionals (cfg.redisUrl == "local") [ "redis-moyai-discord-bot.service" ]; script = '' ${getExe cfg.package} @@ -109,7 +109,7 @@ in environment = { REDIS_URL = if cfg.redisUrl == "local" then - "unix:${config.services.redis.servers.chill-discord-bot.unixSocket}" + "unix:${config.services.redis.servers.moyai-discord-bot.unixSocket}" else cfg.redisUrl; }; diff --git a/nix/package.nix b/nix/package.nix index abb3129..bc0a76f 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -11,7 +11,7 @@ let in rustPlatform.buildRustPackage { - pname = "chill-discord-bot"; + pname = "moyai-discord-bot"; version = (lib.importTOML ../Cargo.toml).package.version or "unknown"; src = fs.toSource { @@ -52,9 +52,9 @@ rustPlatform.buildRustPackage { meta = { description = "funni bot"; - homepage = "https://github.com/getchoo/chill"; + homepage = "https://github.com/getchoo/moyai-bot"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ getchoo ]; - mainProgram = "chill"; + mainProgram = "moyai-bot"; }; } diff --git a/src/commands/general/version.rs b/src/commands/general/version.rs index 34513fc..b2af0f6 100644 --- a/src/commands/general/version.rs +++ b/src/commands/general/version.rs @@ -12,7 +12,7 @@ pub async fn version(ctx: Context<'_>) -> Result<()> { let revision_url = format!( "[{}]({}/tree/{})", sha, - option_env!("CARGO_PKG_REPOSITORY").unwrap_or("https://github.com/getchoo/chill"), + option_env!("CARGO_PKG_REPOSITORY").unwrap_or("https://github.com/getchoo/moyai-bot"), sha, ); diff --git a/src/http/mod.rs b/src/http/mod.rs index dde769c..fdd1569 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -19,7 +19,7 @@ impl Ext for Client { fn default() -> Self { reqwest::ClientBuilder::new() .user_agent(format!( - "chill-discord-bot/{}", + "moyai-discord-bot/{}", option_env!("CARGO_PKG_VERSION").unwrap_or("development") )) .build() |
