├── .dockerignore ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── LICENSE-APACHE ├── LICENSE-APACHE-UWU ├── LICENSE-MIT ├── LICENSE-MIT-UWU ├── README.md └── src ├── bot.rs ├── bot └── event_handler.rs ├── config.rs ├── lib.rs ├── main.rs └── uwu.rs /.dockerignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | on: 2 | push: 3 | branches: 4 | - master 5 | pull_request: {} 6 | 7 | name: Continuous integration 8 | 9 | jobs: 10 | check: 11 | name: Check 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | rust: 16 | - stable 17 | steps: 18 | - uses: actions/checkout@v1 19 | - uses: actions-rs/toolchain@v1 20 | with: 21 | toolchain: ${{ matrix.rust }} 22 | override: true 23 | - uses: actions-rs/cargo@v1 24 | with: 25 | command: check 26 | 27 | test-matrix: 28 | name: Test Suite 29 | runs-on: ubuntu-latest 30 | strategy: 31 | matrix: 32 | rust: 33 | - stable 34 | - beta 35 | - nightly 36 | steps: 37 | - uses: actions/checkout@v1 38 | - uses: actions-rs/toolchain@v1 39 | with: 40 | toolchain: ${{ matrix.rust }} 41 | override: true 42 | - uses: actions-rs/cargo@v1 43 | with: 44 | command: test 45 | 46 | test-os: 47 | name: Test Suite 48 | runs-on: ${{ matrix.os }} 49 | strategy: 50 | matrix: 51 | os: [ubuntu-latest, windows-latest, macOS-latest] 52 | steps: 53 | - uses: actions/checkout@v1 54 | - uses: actions-rs/toolchain@v1 55 | with: 56 | toolchain: stable 57 | profile: minimal 58 | override: true 59 | - uses: actions-rs/cargo@v1 60 | with: 61 | command: test 62 | 63 | fmt: 64 | name: Rustfmt 65 | runs-on: ubuntu-latest 66 | strategy: 67 | matrix: 68 | rust: 69 | - stable 70 | steps: 71 | - uses: actions/checkout@v1 72 | - uses: actions-rs/toolchain@v1 73 | with: 74 | toolchain: ${{ matrix.rust }} 75 | override: true 76 | - run: rustup component add rustfmt 77 | - uses: actions-rs/cargo@v1 78 | with: 79 | command: fmt 80 | args: --all -- --check 81 | 82 | clippy: 83 | name: Clippy 84 | runs-on: ubuntu-latest 85 | strategy: 86 | matrix: 87 | rust: 88 | - stable 89 | steps: 90 | - uses: actions/checkout@v1 91 | - uses: actions-rs/toolchain@v1 92 | with: 93 | toolchain: ${{ matrix.rust }} 94 | override: true 95 | - run: rustup component add clippy 96 | - uses: actions-rs/cargo@v1 97 | with: 98 | command: clippy 99 | args: -- -D warnings 100 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | 8 | 9 | ## [Unreleased] - ReleaseDate 10 | 11 | ## [0.3.0] - 2021-03-28 12 | # Added 13 | - Add new methods to `Bot` for listing and deleting guild slash commands 14 | - Exposed methods via new subcommands in main.rs 15 | 16 | # Changed 17 | - Removed implicit command registration from `Bot::run` 18 | - Changed `Bot::run` to be an async function 19 | - Removed `guild_id` from `Config` struct 20 | 21 | ## [0.2.2] - 2021-03-27 22 | # Added 23 | - Added example for how to run with docker 24 | 25 | ## [0.2.1] - 2021-03-27 26 | # Added 27 | - Add a Dockerfile for deploying uwubot 28 | - Add an environment variable fallback for each argument 29 | 30 | ## [0.2.0] - 2021-03-16 31 | # Changed 32 | - Moved structopt argument parser into main.rs and export new `Config` replacement 33 | 34 | 35 | [Unreleased]: https://github.com/yaahc/uwubot/compare/v0.3.0...HEAD 36 | [0.3.0]: https://github.com/yaahc/uwubot/compare/v0.2.2...v0.3.0 37 | [0.2.2]: https://github.com/yaahc/uwubot/compare/v0.2.1...v0.2.2 38 | [0.2.1]: https://github.com/yaahc/uwubot/compare/v0.2.0...v0.2.1 39 | [0.2.0]: https://github.com/yaahc/uwubot/releases/tag/v0.2.0 40 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "addr2line" 5 | version = "0.14.1" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" 8 | dependencies = [ 9 | "gimli", 10 | ] 11 | 12 | [[package]] 13 | name = "adler" 14 | version = "1.0.2" 15 | source = "registry+https://github.com/rust-lang/crates.io-index" 16 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 17 | 18 | [[package]] 19 | name = "ansi_term" 20 | version = "0.11.0" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 23 | dependencies = [ 24 | "winapi", 25 | ] 26 | 27 | [[package]] 28 | name = "async-trait" 29 | version = "0.1.48" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf" 32 | dependencies = [ 33 | "proc-macro2", 34 | "quote", 35 | "syn", 36 | ] 37 | 38 | [[package]] 39 | name = "async-tungstenite" 40 | version = "0.11.0" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "f7cc5408453d37e2b1c6f01d8078af1da58b6cfa6a80fa2ede3bd2b9a6ada9c4" 43 | dependencies = [ 44 | "futures-io", 45 | "futures-util", 46 | "log", 47 | "pin-project", 48 | "tokio", 49 | "tokio-rustls", 50 | "tungstenite", 51 | "webpki-roots 0.20.0", 52 | ] 53 | 54 | [[package]] 55 | name = "atty" 56 | version = "0.2.14" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 59 | dependencies = [ 60 | "hermit-abi", 61 | "libc", 62 | "winapi", 63 | ] 64 | 65 | [[package]] 66 | name = "autocfg" 67 | version = "1.0.1" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 70 | 71 | [[package]] 72 | name = "backtrace" 73 | version = "0.3.56" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" 76 | dependencies = [ 77 | "addr2line", 78 | "cfg-if", 79 | "libc", 80 | "miniz_oxide", 81 | "object", 82 | "rustc-demangle", 83 | ] 84 | 85 | [[package]] 86 | name = "base64" 87 | version = "0.12.3" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 90 | 91 | [[package]] 92 | name = "base64" 93 | version = "0.13.0" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 96 | 97 | [[package]] 98 | name = "bitflags" 99 | version = "1.2.1" 100 | source = "registry+https://github.com/rust-lang/crates.io-index" 101 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 102 | 103 | [[package]] 104 | name = "block-buffer" 105 | version = "0.9.0" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 108 | dependencies = [ 109 | "generic-array", 110 | ] 111 | 112 | [[package]] 113 | name = "bumpalo" 114 | version = "3.6.1" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" 117 | 118 | [[package]] 119 | name = "byteorder" 120 | version = "1.4.3" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 123 | 124 | [[package]] 125 | name = "bytes" 126 | version = "0.5.6" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" 129 | 130 | [[package]] 131 | name = "bytes" 132 | version = "1.0.1" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" 135 | 136 | [[package]] 137 | name = "cc" 138 | version = "1.0.67" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" 141 | 142 | [[package]] 143 | name = "cfg-if" 144 | version = "1.0.0" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 147 | 148 | [[package]] 149 | name = "chrono" 150 | version = "0.4.19" 151 | source = "registry+https://github.com/rust-lang/crates.io-index" 152 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 153 | dependencies = [ 154 | "libc", 155 | "num-integer", 156 | "num-traits", 157 | "serde", 158 | "time", 159 | "winapi", 160 | ] 161 | 162 | [[package]] 163 | name = "clap" 164 | version = "2.33.3" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" 167 | dependencies = [ 168 | "ansi_term", 169 | "atty", 170 | "bitflags", 171 | "strsim", 172 | "textwrap", 173 | "unicode-width", 174 | "vec_map", 175 | ] 176 | 177 | [[package]] 178 | name = "color-eyre" 179 | version = "0.5.10" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "7b29030875fd8376e4a28ef497790d5b4a7843d8d1396bf08ce46f5eec562c5c" 182 | dependencies = [ 183 | "backtrace", 184 | "color-spantrace", 185 | "eyre", 186 | "indenter", 187 | "once_cell", 188 | "owo-colors", 189 | "tracing-error", 190 | ] 191 | 192 | [[package]] 193 | name = "color-spantrace" 194 | version = "0.1.6" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "b6eee477a4a8a72f4addd4de416eb56d54bc307b284d6601bafdee1f4ea462d1" 197 | dependencies = [ 198 | "once_cell", 199 | "owo-colors", 200 | "tracing-core", 201 | "tracing-error", 202 | ] 203 | 204 | [[package]] 205 | name = "cpuid-bool" 206 | version = "0.1.2" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" 209 | 210 | [[package]] 211 | name = "crc32fast" 212 | version = "1.2.1" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" 215 | dependencies = [ 216 | "cfg-if", 217 | ] 218 | 219 | [[package]] 220 | name = "digest" 221 | version = "0.9.0" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 224 | dependencies = [ 225 | "generic-array", 226 | ] 227 | 228 | [[package]] 229 | name = "encoding_rs" 230 | version = "0.8.28" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" 233 | dependencies = [ 234 | "cfg-if", 235 | ] 236 | 237 | [[package]] 238 | name = "eyre" 239 | version = "0.6.5" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "221239d1d5ea86bf5d6f91c9d6bc3646ffe471b08ff9b0f91c44f115ac969d2b" 242 | dependencies = [ 243 | "indenter", 244 | "once_cell", 245 | ] 246 | 247 | [[package]] 248 | name = "flate2" 249 | version = "1.0.20" 250 | source = "registry+https://github.com/rust-lang/crates.io-index" 251 | checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" 252 | dependencies = [ 253 | "cfg-if", 254 | "crc32fast", 255 | "libc", 256 | "miniz_oxide", 257 | ] 258 | 259 | [[package]] 260 | name = "fnv" 261 | version = "1.0.7" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 264 | 265 | [[package]] 266 | name = "form_urlencoded" 267 | version = "1.0.1" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 270 | dependencies = [ 271 | "matches", 272 | "percent-encoding", 273 | ] 274 | 275 | [[package]] 276 | name = "futures" 277 | version = "0.3.13" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1" 280 | dependencies = [ 281 | "futures-channel", 282 | "futures-core", 283 | "futures-io", 284 | "futures-sink", 285 | "futures-task", 286 | "futures-util", 287 | ] 288 | 289 | [[package]] 290 | name = "futures-channel" 291 | version = "0.3.13" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" 294 | dependencies = [ 295 | "futures-core", 296 | "futures-sink", 297 | ] 298 | 299 | [[package]] 300 | name = "futures-core" 301 | version = "0.3.13" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" 304 | 305 | [[package]] 306 | name = "futures-io" 307 | version = "0.3.13" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" 310 | 311 | [[package]] 312 | name = "futures-macro" 313 | version = "0.3.13" 314 | source = "registry+https://github.com/rust-lang/crates.io-index" 315 | checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7" 316 | dependencies = [ 317 | "proc-macro-hack", 318 | "proc-macro2", 319 | "quote", 320 | "syn", 321 | ] 322 | 323 | [[package]] 324 | name = "futures-sink" 325 | version = "0.3.13" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" 328 | 329 | [[package]] 330 | name = "futures-task" 331 | version = "0.3.13" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80" 334 | 335 | [[package]] 336 | name = "futures-util" 337 | version = "0.3.13" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1" 340 | dependencies = [ 341 | "futures-channel", 342 | "futures-core", 343 | "futures-io", 344 | "futures-macro", 345 | "futures-sink", 346 | "futures-task", 347 | "memchr", 348 | "pin-project-lite", 349 | "pin-utils", 350 | "proc-macro-hack", 351 | "proc-macro-nested", 352 | "slab", 353 | ] 354 | 355 | [[package]] 356 | name = "generic-array" 357 | version = "0.14.4" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" 360 | dependencies = [ 361 | "typenum", 362 | "version_check", 363 | ] 364 | 365 | [[package]] 366 | name = "getrandom" 367 | version = "0.1.16" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 370 | dependencies = [ 371 | "cfg-if", 372 | "libc", 373 | "wasi 0.9.0+wasi-snapshot-preview1", 374 | ] 375 | 376 | [[package]] 377 | name = "gimli" 378 | version = "0.23.0" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" 381 | 382 | [[package]] 383 | name = "h2" 384 | version = "0.3.2" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "fc018e188373e2777d0ef2467ebff62a08e66c3f5857b23c8fbec3018210dc00" 387 | dependencies = [ 388 | "bytes 1.0.1", 389 | "fnv", 390 | "futures-core", 391 | "futures-sink", 392 | "futures-util", 393 | "http", 394 | "indexmap", 395 | "slab", 396 | "tokio", 397 | "tokio-util", 398 | "tracing", 399 | ] 400 | 401 | [[package]] 402 | name = "hashbrown" 403 | version = "0.9.1" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 406 | 407 | [[package]] 408 | name = "heck" 409 | version = "0.3.2" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" 412 | dependencies = [ 413 | "unicode-segmentation", 414 | ] 415 | 416 | [[package]] 417 | name = "hermit-abi" 418 | version = "0.1.18" 419 | source = "registry+https://github.com/rust-lang/crates.io-index" 420 | checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" 421 | dependencies = [ 422 | "libc", 423 | ] 424 | 425 | [[package]] 426 | name = "http" 427 | version = "0.2.3" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" 430 | dependencies = [ 431 | "bytes 1.0.1", 432 | "fnv", 433 | "itoa", 434 | ] 435 | 436 | [[package]] 437 | name = "http-body" 438 | version = "0.4.1" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737" 441 | dependencies = [ 442 | "bytes 1.0.1", 443 | "http", 444 | "pin-project-lite", 445 | ] 446 | 447 | [[package]] 448 | name = "httparse" 449 | version = "1.3.5" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" 452 | 453 | [[package]] 454 | name = "httpdate" 455 | version = "0.3.2" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" 458 | 459 | [[package]] 460 | name = "hyper" 461 | version = "0.14.4" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" 464 | dependencies = [ 465 | "bytes 1.0.1", 466 | "futures-channel", 467 | "futures-core", 468 | "futures-util", 469 | "h2", 470 | "http", 471 | "http-body", 472 | "httparse", 473 | "httpdate", 474 | "itoa", 475 | "pin-project", 476 | "socket2", 477 | "tokio", 478 | "tower-service", 479 | "tracing", 480 | "want", 481 | ] 482 | 483 | [[package]] 484 | name = "hyper-rustls" 485 | version = "0.22.1" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" 488 | dependencies = [ 489 | "futures-util", 490 | "hyper", 491 | "log", 492 | "rustls", 493 | "tokio", 494 | "tokio-rustls", 495 | "webpki", 496 | ] 497 | 498 | [[package]] 499 | name = "idna" 500 | version = "0.2.2" 501 | source = "registry+https://github.com/rust-lang/crates.io-index" 502 | checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" 503 | dependencies = [ 504 | "matches", 505 | "unicode-bidi", 506 | "unicode-normalization", 507 | ] 508 | 509 | [[package]] 510 | name = "indenter" 511 | version = "0.3.3" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 514 | 515 | [[package]] 516 | name = "indexmap" 517 | version = "1.6.2" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" 520 | dependencies = [ 521 | "autocfg", 522 | "hashbrown", 523 | ] 524 | 525 | [[package]] 526 | name = "input_buffer" 527 | version = "0.3.1" 528 | source = "registry+https://github.com/rust-lang/crates.io-index" 529 | checksum = "19a8a95243d5a0398cae618ec29477c6e3cb631152be5c19481f80bc71559754" 530 | dependencies = [ 531 | "bytes 0.5.6", 532 | ] 533 | 534 | [[package]] 535 | name = "instant" 536 | version = "0.1.9" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" 539 | dependencies = [ 540 | "cfg-if", 541 | ] 542 | 543 | [[package]] 544 | name = "ipnet" 545 | version = "2.3.0" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" 548 | 549 | [[package]] 550 | name = "itoa" 551 | version = "0.4.7" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" 554 | 555 | [[package]] 556 | name = "js-sys" 557 | version = "0.3.49" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821" 560 | dependencies = [ 561 | "wasm-bindgen", 562 | ] 563 | 564 | [[package]] 565 | name = "lazy_static" 566 | version = "1.4.0" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 569 | 570 | [[package]] 571 | name = "libc" 572 | version = "0.2.91" 573 | source = "registry+https://github.com/rust-lang/crates.io-index" 574 | checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" 575 | 576 | [[package]] 577 | name = "lock_api" 578 | version = "0.4.2" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" 581 | dependencies = [ 582 | "scopeguard", 583 | ] 584 | 585 | [[package]] 586 | name = "log" 587 | version = "0.4.14" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 590 | dependencies = [ 591 | "cfg-if", 592 | ] 593 | 594 | [[package]] 595 | name = "matches" 596 | version = "0.1.8" 597 | source = "registry+https://github.com/rust-lang/crates.io-index" 598 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 599 | 600 | [[package]] 601 | name = "memchr" 602 | version = "2.3.4" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" 605 | 606 | [[package]] 607 | name = "mime" 608 | version = "0.3.16" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 611 | 612 | [[package]] 613 | name = "mime_guess" 614 | version = "2.0.3" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" 617 | dependencies = [ 618 | "mime", 619 | "unicase", 620 | ] 621 | 622 | [[package]] 623 | name = "miniz_oxide" 624 | version = "0.4.4" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" 627 | dependencies = [ 628 | "adler", 629 | "autocfg", 630 | ] 631 | 632 | [[package]] 633 | name = "mio" 634 | version = "0.7.11" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" 637 | dependencies = [ 638 | "libc", 639 | "log", 640 | "miow", 641 | "ntapi", 642 | "winapi", 643 | ] 644 | 645 | [[package]] 646 | name = "miow" 647 | version = "0.3.7" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 650 | dependencies = [ 651 | "winapi", 652 | ] 653 | 654 | [[package]] 655 | name = "ntapi" 656 | version = "0.3.6" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 659 | dependencies = [ 660 | "winapi", 661 | ] 662 | 663 | [[package]] 664 | name = "num-integer" 665 | version = "0.1.44" 666 | source = "registry+https://github.com/rust-lang/crates.io-index" 667 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 668 | dependencies = [ 669 | "autocfg", 670 | "num-traits", 671 | ] 672 | 673 | [[package]] 674 | name = "num-traits" 675 | version = "0.2.14" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 678 | dependencies = [ 679 | "autocfg", 680 | ] 681 | 682 | [[package]] 683 | name = "num_cpus" 684 | version = "1.13.0" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 687 | dependencies = [ 688 | "hermit-abi", 689 | "libc", 690 | ] 691 | 692 | [[package]] 693 | name = "object" 694 | version = "0.23.0" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" 697 | 698 | [[package]] 699 | name = "once_cell" 700 | version = "1.7.2" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" 703 | 704 | [[package]] 705 | name = "opaque-debug" 706 | version = "0.3.0" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 709 | 710 | [[package]] 711 | name = "owo-colors" 712 | version = "1.3.0" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "2386b4ebe91c2f7f51082d4cefa145d030e33a1842a96b12e4885cc3c01f7a55" 715 | 716 | [[package]] 717 | name = "parking_lot" 718 | version = "0.11.1" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" 721 | dependencies = [ 722 | "instant", 723 | "lock_api", 724 | "parking_lot_core", 725 | ] 726 | 727 | [[package]] 728 | name = "parking_lot_core" 729 | version = "0.8.3" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" 732 | dependencies = [ 733 | "cfg-if", 734 | "instant", 735 | "libc", 736 | "redox_syscall", 737 | "smallvec", 738 | "winapi", 739 | ] 740 | 741 | [[package]] 742 | name = "percent-encoding" 743 | version = "2.1.0" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 746 | 747 | [[package]] 748 | name = "pin-project" 749 | version = "1.0.6" 750 | source = "registry+https://github.com/rust-lang/crates.io-index" 751 | checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6" 752 | dependencies = [ 753 | "pin-project-internal", 754 | ] 755 | 756 | [[package]] 757 | name = "pin-project-internal" 758 | version = "1.0.6" 759 | source = "registry+https://github.com/rust-lang/crates.io-index" 760 | checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5" 761 | dependencies = [ 762 | "proc-macro2", 763 | "quote", 764 | "syn", 765 | ] 766 | 767 | [[package]] 768 | name = "pin-project-lite" 769 | version = "0.2.6" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" 772 | 773 | [[package]] 774 | name = "pin-utils" 775 | version = "0.1.0" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 778 | 779 | [[package]] 780 | name = "ppv-lite86" 781 | version = "0.2.10" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 784 | 785 | [[package]] 786 | name = "proc-macro-error" 787 | version = "1.0.4" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 790 | dependencies = [ 791 | "proc-macro-error-attr", 792 | "proc-macro2", 793 | "quote", 794 | "syn", 795 | "version_check", 796 | ] 797 | 798 | [[package]] 799 | name = "proc-macro-error-attr" 800 | version = "1.0.4" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 803 | dependencies = [ 804 | "proc-macro2", 805 | "quote", 806 | "version_check", 807 | ] 808 | 809 | [[package]] 810 | name = "proc-macro-hack" 811 | version = "0.5.19" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 814 | 815 | [[package]] 816 | name = "proc-macro-nested" 817 | version = "0.1.7" 818 | source = "registry+https://github.com/rust-lang/crates.io-index" 819 | checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" 820 | 821 | [[package]] 822 | name = "proc-macro2" 823 | version = "1.0.24" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" 826 | dependencies = [ 827 | "unicode-xid", 828 | ] 829 | 830 | [[package]] 831 | name = "quote" 832 | version = "1.0.9" 833 | source = "registry+https://github.com/rust-lang/crates.io-index" 834 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 835 | dependencies = [ 836 | "proc-macro2", 837 | ] 838 | 839 | [[package]] 840 | name = "rand" 841 | version = "0.7.3" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 844 | dependencies = [ 845 | "getrandom", 846 | "libc", 847 | "rand_chacha", 848 | "rand_core", 849 | "rand_hc", 850 | ] 851 | 852 | [[package]] 853 | name = "rand_chacha" 854 | version = "0.2.2" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 857 | dependencies = [ 858 | "ppv-lite86", 859 | "rand_core", 860 | ] 861 | 862 | [[package]] 863 | name = "rand_core" 864 | version = "0.5.1" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 867 | dependencies = [ 868 | "getrandom", 869 | ] 870 | 871 | [[package]] 872 | name = "rand_hc" 873 | version = "0.2.0" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 876 | dependencies = [ 877 | "rand_core", 878 | ] 879 | 880 | [[package]] 881 | name = "redox_syscall" 882 | version = "0.2.5" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" 885 | dependencies = [ 886 | "bitflags", 887 | ] 888 | 889 | [[package]] 890 | name = "reqwest" 891 | version = "0.11.2" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "bf12057f289428dbf5c591c74bf10392e4a8003f993405a902f20117019022d4" 894 | dependencies = [ 895 | "base64 0.13.0", 896 | "bytes 1.0.1", 897 | "encoding_rs", 898 | "futures-core", 899 | "futures-util", 900 | "http", 901 | "http-body", 902 | "hyper", 903 | "hyper-rustls", 904 | "ipnet", 905 | "js-sys", 906 | "lazy_static", 907 | "log", 908 | "mime", 909 | "mime_guess", 910 | "percent-encoding", 911 | "pin-project-lite", 912 | "rustls", 913 | "serde", 914 | "serde_json", 915 | "serde_urlencoded", 916 | "tokio", 917 | "tokio-rustls", 918 | "url", 919 | "wasm-bindgen", 920 | "wasm-bindgen-futures", 921 | "web-sys", 922 | "webpki-roots 0.21.0", 923 | "winreg", 924 | ] 925 | 926 | [[package]] 927 | name = "ring" 928 | version = "0.16.20" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 931 | dependencies = [ 932 | "cc", 933 | "libc", 934 | "once_cell", 935 | "spin", 936 | "untrusted", 937 | "web-sys", 938 | "winapi", 939 | ] 940 | 941 | [[package]] 942 | name = "rustc-demangle" 943 | version = "0.1.18" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" 946 | 947 | [[package]] 948 | name = "rustls" 949 | version = "0.19.0" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" 952 | dependencies = [ 953 | "base64 0.13.0", 954 | "log", 955 | "ring", 956 | "sct", 957 | "webpki", 958 | ] 959 | 960 | [[package]] 961 | name = "ryu" 962 | version = "1.0.5" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 965 | 966 | [[package]] 967 | name = "scopeguard" 968 | version = "1.1.0" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 971 | 972 | [[package]] 973 | name = "sct" 974 | version = "0.6.0" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" 977 | dependencies = [ 978 | "ring", 979 | "untrusted", 980 | ] 981 | 982 | [[package]] 983 | name = "serde" 984 | version = "1.0.125" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" 987 | dependencies = [ 988 | "serde_derive", 989 | ] 990 | 991 | [[package]] 992 | name = "serde_derive" 993 | version = "1.0.125" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" 996 | dependencies = [ 997 | "proc-macro2", 998 | "quote", 999 | "syn", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "serde_json" 1004 | version = "1.0.64" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" 1007 | dependencies = [ 1008 | "itoa", 1009 | "ryu", 1010 | "serde", 1011 | ] 1012 | 1013 | [[package]] 1014 | name = "serde_urlencoded" 1015 | version = "0.7.0" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 1018 | dependencies = [ 1019 | "form_urlencoded", 1020 | "itoa", 1021 | "ryu", 1022 | "serde", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "serenity" 1027 | version = "0.10.4" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "f86e9dc74c89931fe12f3af64ae484268c0a4864a90fb2b7d2e867a301f173c4" 1030 | dependencies = [ 1031 | "async-trait", 1032 | "async-tungstenite", 1033 | "base64 0.13.0", 1034 | "bitflags", 1035 | "bytes 1.0.1", 1036 | "chrono", 1037 | "flate2", 1038 | "futures", 1039 | "percent-encoding", 1040 | "reqwest", 1041 | "serde", 1042 | "serde_json", 1043 | "tokio", 1044 | "tracing", 1045 | "typemap_rev", 1046 | "url", 1047 | ] 1048 | 1049 | [[package]] 1050 | name = "sha-1" 1051 | version = "0.9.4" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f" 1054 | dependencies = [ 1055 | "block-buffer", 1056 | "cfg-if", 1057 | "cpuid-bool", 1058 | "digest", 1059 | "opaque-debug", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "sharded-slab" 1064 | version = "0.1.1" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "79c719719ee05df97490f80a45acfc99e5a30ce98a1e4fb67aee422745ae14e3" 1067 | dependencies = [ 1068 | "lazy_static", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "slab" 1073 | version = "0.4.2" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1076 | 1077 | [[package]] 1078 | name = "smallvec" 1079 | version = "1.6.1" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" 1082 | 1083 | [[package]] 1084 | name = "socket2" 1085 | version = "0.3.19" 1086 | source = "registry+https://github.com/rust-lang/crates.io-index" 1087 | checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" 1088 | dependencies = [ 1089 | "cfg-if", 1090 | "libc", 1091 | "winapi", 1092 | ] 1093 | 1094 | [[package]] 1095 | name = "spin" 1096 | version = "0.5.2" 1097 | source = "registry+https://github.com/rust-lang/crates.io-index" 1098 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1099 | 1100 | [[package]] 1101 | name = "strsim" 1102 | version = "0.8.0" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1105 | 1106 | [[package]] 1107 | name = "structopt" 1108 | version = "0.3.21" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" 1111 | dependencies = [ 1112 | "clap", 1113 | "lazy_static", 1114 | "structopt-derive", 1115 | ] 1116 | 1117 | [[package]] 1118 | name = "structopt-derive" 1119 | version = "0.4.14" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" 1122 | dependencies = [ 1123 | "heck", 1124 | "proc-macro-error", 1125 | "proc-macro2", 1126 | "quote", 1127 | "syn", 1128 | ] 1129 | 1130 | [[package]] 1131 | name = "syn" 1132 | version = "1.0.64" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | checksum = "3fd9d1e9976102a03c542daa2eff1b43f9d72306342f3f8b3ed5fb8908195d6f" 1135 | dependencies = [ 1136 | "proc-macro2", 1137 | "quote", 1138 | "unicode-xid", 1139 | ] 1140 | 1141 | [[package]] 1142 | name = "textwrap" 1143 | version = "0.11.0" 1144 | source = "registry+https://github.com/rust-lang/crates.io-index" 1145 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1146 | dependencies = [ 1147 | "unicode-width", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "thiserror" 1152 | version = "1.0.24" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" 1155 | dependencies = [ 1156 | "thiserror-impl", 1157 | ] 1158 | 1159 | [[package]] 1160 | name = "thiserror-impl" 1161 | version = "1.0.24" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" 1164 | dependencies = [ 1165 | "proc-macro2", 1166 | "quote", 1167 | "syn", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "thread_local" 1172 | version = "1.1.3" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" 1175 | dependencies = [ 1176 | "once_cell", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "time" 1181 | version = "0.1.44" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" 1184 | dependencies = [ 1185 | "libc", 1186 | "wasi 0.10.0+wasi-snapshot-preview1", 1187 | "winapi", 1188 | ] 1189 | 1190 | [[package]] 1191 | name = "tinyvec" 1192 | version = "1.1.1" 1193 | source = "registry+https://github.com/rust-lang/crates.io-index" 1194 | checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" 1195 | dependencies = [ 1196 | "tinyvec_macros", 1197 | ] 1198 | 1199 | [[package]] 1200 | name = "tinyvec_macros" 1201 | version = "0.1.0" 1202 | source = "registry+https://github.com/rust-lang/crates.io-index" 1203 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1204 | 1205 | [[package]] 1206 | name = "tokio" 1207 | version = "1.4.0" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "134af885d758d645f0f0505c9a8b3f9bf8a348fd822e112ab5248138348f1722" 1210 | dependencies = [ 1211 | "autocfg", 1212 | "bytes 1.0.1", 1213 | "libc", 1214 | "memchr", 1215 | "mio", 1216 | "num_cpus", 1217 | "pin-project-lite", 1218 | "tokio-macros", 1219 | ] 1220 | 1221 | [[package]] 1222 | name = "tokio-macros" 1223 | version = "1.1.0" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" 1226 | dependencies = [ 1227 | "proc-macro2", 1228 | "quote", 1229 | "syn", 1230 | ] 1231 | 1232 | [[package]] 1233 | name = "tokio-rustls" 1234 | version = "0.22.0" 1235 | source = "registry+https://github.com/rust-lang/crates.io-index" 1236 | checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" 1237 | dependencies = [ 1238 | "rustls", 1239 | "tokio", 1240 | "webpki", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "tokio-util" 1245 | version = "0.6.5" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "5143d049e85af7fbc36f5454d990e62c2df705b3589f123b71f441b6b59f443f" 1248 | dependencies = [ 1249 | "bytes 1.0.1", 1250 | "futures-core", 1251 | "futures-sink", 1252 | "log", 1253 | "pin-project-lite", 1254 | "tokio", 1255 | ] 1256 | 1257 | [[package]] 1258 | name = "tower-service" 1259 | version = "0.3.1" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 1262 | 1263 | [[package]] 1264 | name = "tracing" 1265 | version = "0.1.25" 1266 | source = "registry+https://github.com/rust-lang/crates.io-index" 1267 | checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" 1268 | dependencies = [ 1269 | "cfg-if", 1270 | "log", 1271 | "pin-project-lite", 1272 | "tracing-attributes", 1273 | "tracing-core", 1274 | ] 1275 | 1276 | [[package]] 1277 | name = "tracing-attributes" 1278 | version = "0.1.15" 1279 | source = "registry+https://github.com/rust-lang/crates.io-index" 1280 | checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" 1281 | dependencies = [ 1282 | "proc-macro2", 1283 | "quote", 1284 | "syn", 1285 | ] 1286 | 1287 | [[package]] 1288 | name = "tracing-core" 1289 | version = "0.1.17" 1290 | source = "registry+https://github.com/rust-lang/crates.io-index" 1291 | checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" 1292 | dependencies = [ 1293 | "lazy_static", 1294 | ] 1295 | 1296 | [[package]] 1297 | name = "tracing-error" 1298 | version = "0.1.2" 1299 | source = "registry+https://github.com/rust-lang/crates.io-index" 1300 | checksum = "b4d7c0b83d4a500748fa5879461652b361edf5c9d51ede2a2ac03875ca185e24" 1301 | dependencies = [ 1302 | "tracing", 1303 | "tracing-subscriber", 1304 | ] 1305 | 1306 | [[package]] 1307 | name = "tracing-subscriber" 1308 | version = "0.2.17" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "705096c6f83bf68ea5d357a6aa01829ddbdac531b357b45abeca842938085baa" 1311 | dependencies = [ 1312 | "sharded-slab", 1313 | "thread_local", 1314 | "tracing-core", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "try-lock" 1319 | version = "0.2.3" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1322 | 1323 | [[package]] 1324 | name = "tungstenite" 1325 | version = "0.11.1" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "f0308d80d86700c5878b9ef6321f020f29b1bb9d5ff3cab25e75e23f3a492a23" 1328 | dependencies = [ 1329 | "base64 0.12.3", 1330 | "byteorder", 1331 | "bytes 0.5.6", 1332 | "http", 1333 | "httparse", 1334 | "input_buffer", 1335 | "log", 1336 | "rand", 1337 | "sha-1", 1338 | "url", 1339 | "utf-8", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "typemap_rev" 1344 | version = "0.1.4" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "335fb14412163adc9ed4a3e53335afaa7a4b72bdd122e5f72f51b8f1db1a131e" 1347 | 1348 | [[package]] 1349 | name = "typenum" 1350 | version = "1.13.0" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" 1353 | 1354 | [[package]] 1355 | name = "unicase" 1356 | version = "2.6.0" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1359 | dependencies = [ 1360 | "version_check", 1361 | ] 1362 | 1363 | [[package]] 1364 | name = "unicode-bidi" 1365 | version = "0.3.4" 1366 | source = "registry+https://github.com/rust-lang/crates.io-index" 1367 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1368 | dependencies = [ 1369 | "matches", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "unicode-normalization" 1374 | version = "0.1.17" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" 1377 | dependencies = [ 1378 | "tinyvec", 1379 | ] 1380 | 1381 | [[package]] 1382 | name = "unicode-segmentation" 1383 | version = "1.7.1" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" 1386 | 1387 | [[package]] 1388 | name = "unicode-width" 1389 | version = "0.1.8" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" 1392 | 1393 | [[package]] 1394 | name = "unicode-xid" 1395 | version = "0.2.1" 1396 | source = "registry+https://github.com/rust-lang/crates.io-index" 1397 | checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" 1398 | 1399 | [[package]] 1400 | name = "untrusted" 1401 | version = "0.7.1" 1402 | source = "registry+https://github.com/rust-lang/crates.io-index" 1403 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 1404 | 1405 | [[package]] 1406 | name = "url" 1407 | version = "2.2.1" 1408 | source = "registry+https://github.com/rust-lang/crates.io-index" 1409 | checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" 1410 | dependencies = [ 1411 | "form_urlencoded", 1412 | "idna", 1413 | "matches", 1414 | "percent-encoding", 1415 | ] 1416 | 1417 | [[package]] 1418 | name = "utf-8" 1419 | version = "0.7.5" 1420 | source = "registry+https://github.com/rust-lang/crates.io-index" 1421 | checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" 1422 | 1423 | [[package]] 1424 | name = "uwubot" 1425 | version = "0.3.0" 1426 | dependencies = [ 1427 | "color-eyre", 1428 | "eyre", 1429 | "owo-colors", 1430 | "serenity", 1431 | "structopt", 1432 | "tokio", 1433 | "uwuify", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "uwuify" 1438 | version = "0.2.1" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "225560ddfe5dbde6d4371f934585f2375868c95d60652a7a0f8f2dcee28f6317" 1441 | dependencies = [ 1442 | "clap", 1443 | "owo-colors", 1444 | "parking_lot", 1445 | "thiserror", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "vec_map" 1450 | version = "0.8.2" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1453 | 1454 | [[package]] 1455 | name = "version_check" 1456 | version = "0.9.3" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 1459 | 1460 | [[package]] 1461 | name = "want" 1462 | version = "0.3.0" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1465 | dependencies = [ 1466 | "log", 1467 | "try-lock", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "wasi" 1472 | version = "0.9.0+wasi-snapshot-preview1" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1475 | 1476 | [[package]] 1477 | name = "wasi" 1478 | version = "0.10.0+wasi-snapshot-preview1" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1481 | 1482 | [[package]] 1483 | name = "wasm-bindgen" 1484 | version = "0.2.72" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" 1487 | dependencies = [ 1488 | "cfg-if", 1489 | "serde", 1490 | "serde_json", 1491 | "wasm-bindgen-macro", 1492 | ] 1493 | 1494 | [[package]] 1495 | name = "wasm-bindgen-backend" 1496 | version = "0.2.72" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3" 1499 | dependencies = [ 1500 | "bumpalo", 1501 | "lazy_static", 1502 | "log", 1503 | "proc-macro2", 1504 | "quote", 1505 | "syn", 1506 | "wasm-bindgen-shared", 1507 | ] 1508 | 1509 | [[package]] 1510 | name = "wasm-bindgen-futures" 1511 | version = "0.4.22" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "73157efb9af26fb564bb59a009afd1c7c334a44db171d280690d0c3faaec3468" 1514 | dependencies = [ 1515 | "cfg-if", 1516 | "js-sys", 1517 | "wasm-bindgen", 1518 | "web-sys", 1519 | ] 1520 | 1521 | [[package]] 1522 | name = "wasm-bindgen-macro" 1523 | version = "0.2.72" 1524 | source = "registry+https://github.com/rust-lang/crates.io-index" 1525 | checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b" 1526 | dependencies = [ 1527 | "quote", 1528 | "wasm-bindgen-macro-support", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "wasm-bindgen-macro-support" 1533 | version = "0.2.72" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d" 1536 | dependencies = [ 1537 | "proc-macro2", 1538 | "quote", 1539 | "syn", 1540 | "wasm-bindgen-backend", 1541 | "wasm-bindgen-shared", 1542 | ] 1543 | 1544 | [[package]] 1545 | name = "wasm-bindgen-shared" 1546 | version = "0.2.72" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa" 1549 | 1550 | [[package]] 1551 | name = "web-sys" 1552 | version = "0.3.49" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310" 1555 | dependencies = [ 1556 | "js-sys", 1557 | "wasm-bindgen", 1558 | ] 1559 | 1560 | [[package]] 1561 | name = "webpki" 1562 | version = "0.21.4" 1563 | source = "registry+https://github.com/rust-lang/crates.io-index" 1564 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 1565 | dependencies = [ 1566 | "ring", 1567 | "untrusted", 1568 | ] 1569 | 1570 | [[package]] 1571 | name = "webpki-roots" 1572 | version = "0.20.0" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | checksum = "0f20dea7535251981a9670857150d571846545088359b28e4951d350bdaf179f" 1575 | dependencies = [ 1576 | "webpki", 1577 | ] 1578 | 1579 | [[package]] 1580 | name = "webpki-roots" 1581 | version = "0.21.0" 1582 | source = "registry+https://github.com/rust-lang/crates.io-index" 1583 | checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" 1584 | dependencies = [ 1585 | "webpki", 1586 | ] 1587 | 1588 | [[package]] 1589 | name = "winapi" 1590 | version = "0.3.9" 1591 | source = "registry+https://github.com/rust-lang/crates.io-index" 1592 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1593 | dependencies = [ 1594 | "winapi-i686-pc-windows-gnu", 1595 | "winapi-x86_64-pc-windows-gnu", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "winapi-i686-pc-windows-gnu" 1600 | version = "0.4.0" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1603 | 1604 | [[package]] 1605 | name = "winapi-x86_64-pc-windows-gnu" 1606 | version = "0.4.0" 1607 | source = "registry+https://github.com/rust-lang/crates.io-index" 1608 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1609 | 1610 | [[package]] 1611 | name = "winreg" 1612 | version = "0.7.0" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 1615 | dependencies = [ 1616 | "winapi", 1617 | ] 1618 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "uwubot" 3 | version = "0.3.0" 4 | authors = ["Jane Lusby "] 5 | edition = "2018" 6 | license = "MIT OR Apache-2.0" 7 | description = "discord bot for uwuifying text" 8 | repository = "https://github.com/yaahc/uwubot" 9 | documentation = "https://docs.rs/uwubot" 10 | readme = "README.md" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [dependencies] 15 | eyre = "0.6.5" 16 | color-eyre = "0.5.10" 17 | structopt = "0.3.21" 18 | uwuify = "0.2.1" 19 | serenity = { version = "0.10.4", default-features = false, features = ["client", "gateway", "rustls_backend", "model", "unstable_discord_api"] } 20 | tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } 21 | owo-colors = "=1.3.0" 22 | 23 | [package.metadata.docs.rs] 24 | all-features = true 25 | rustdoc-args = ["--cfg", "docsrs"] 26 | 27 | [package.metadata.release] 28 | no-dev-version = true 29 | 30 | [[package.metadata.release.pre-release-replacements]] 31 | file = "CHANGELOG.md" 32 | search = "Unreleased" 33 | replace="{{version}}" 34 | 35 | [[package.metadata.release.pre-release-replacements]] 36 | file = "src/lib.rs" 37 | search = "#!\\[doc\\(html_root_url.*" 38 | replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" 39 | exactly = 1 40 | 41 | [[package.metadata.release.pre-release-replacements]] 42 | file = "CHANGELOG.md" 43 | search = "ReleaseDate" 44 | replace="{{date}}" 45 | 46 | [[package.metadata.release.pre-release-replacements]] 47 | file="CHANGELOG.md" 48 | search="" 49 | replace="\n\n## [Unreleased] - ReleaseDate" 50 | exactly=1 51 | 52 | # Disable this replacement on the very first release 53 | [[package.metadata.release.pre-release-replacements]] 54 | file = "CHANGELOG.md" 55 | search = "\\.\\.\\.HEAD" 56 | replace="...{{tag_name}}" 57 | exactly = 1 58 | # END SECTION, do not comment out the replacement below this, and do not reorder them 59 | 60 | [[package.metadata.release.pre-release-replacements]] 61 | file="CHANGELOG.md" 62 | search="" 63 | replace="\n[Unreleased]: https://github.com/yaahc/{{crate_name}}/compare/{{tag_name}}...HEAD" 64 | exactly=1 65 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rust:latest as builder 2 | WORKDIR /usr/src/uwubot 3 | COPY . . 4 | RUN cargo install --path . 5 | 6 | FROM debian:buster-slim 7 | # RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/* 8 | RUN apt-get update && rm -rf /var/lib/apt/lists/* 9 | COPY --from=builder /usr/local/cargo/bin/uwubot /usr/local/bin/uwubot 10 | CMD ["uwubot"] 11 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-APACHE-UWU: -------------------------------------------------------------------------------- 1 | apache w-wicense 2 | v-vewsion 2.0, òωó januawy 2004 3 | h-http://www.apache.owg/wicenses/ 4 | 5 | tewms and conditions f-fow use, ( ͡o ω ͡o ) wepwoduction, (˘ω˘) a-and distwibution 6 | 7 | 1. ( ͡o ω ͡o ) definitions. OwO 8 | 9 | "wicense" shaww mean the tewms a-and conditions fow use, UwU wepwoduction, o.O 10 | a-and d-distwibution as d-defined by sections 1 thwough 9 of this document. rawr x3 11 | 12 | "wicensow" shaww mean the copywight ownew ow entity authowized b-by 13 | the copywight ownew that is gwanting the wicense. OwO 14 | 15 | "wegaw entity" s-shaww mean the u-union of the acting entity and a-aww 16 | othew entities that contwow, (U ﹏ U) awe contwowwed by, ( ͡o ω ͡o ) ow awe undew c-common 17 | contwow with that e-entity. (U ﹏ U) fow the p-puwposes of this d-definition, UwU 18 | "contwow" m-means (i) the powew, (ꈍᴗꈍ) diwect o-ow indiwect, ʘwʘ to cause the 19 | diwection ow m-management of such e-entity, (⑅˘꒳˘) whethew b-by contwact ow 20 | othewwise, (U ᵕ U❁) ow (ii) ownewship of fifty pewcent (50%) o-ow mowe of the 21 | outstanding s-shawes, ( ͡o ω ͡o ) ow (iii) beneficiaw ownewship of such entity. OwO 22 | 23 | "you" (ow "youw") shaww mean an i-individuaw ow wegaw entity 24 | exewcising pewmissions g-gwanted by this wicense. rawr x3 25 | 26 | "souwce" fowm s-shaww mean the p-pwefewwed fowm fow m-making modifications, (///ˬ///✿) 27 | incwuding but nyot wimited to softwawe souwce code, (U ﹏ U) documentation 28 | souwce, σωσ and configuwation f-fiwes. (U ﹏ U) 29 | 30 | "object" fowm s-shaww mean any f-fowm wesuwting f-fwom mechanicaw 31 | t-twansfowmation o-ow twanswation of a souwce fowm, (U ﹏ U) incwuding but 32 | n-nyot wimited to compiwed object c-code, ( ͡o ω ͡o ) genewated documentation, UwU 33 | a-and convewsions t-to othew media types. OwO 34 | 35 | "wowk" shaww mean the wowk of a-authowship, (˘ω˘) whethew in souwce ow 36 | object fowm, σωσ m-made avaiwabwe undew the wicense, (ꈍᴗꈍ) as indicated by a 37 | copywight n-nyotice that is incwuded in ow a-attached to the w-wowk 38 | (an exampwe i-is pwovided i-in the appendix bewow). UwU 39 | 40 | "dewivative w-wowks" s-shaww mean any wowk, UwU w-whethew in souwce ow object 41 | f-fowm, >w< that is based on (ow dewived fwom) the w-wowk and fow which t-the 42 | editowiaw wevisions, >w< a-annotations, >w< ewabowations, rawr x3 ow othew m-modifications 43 | w-wepwesent, σωσ as a whowe, òωó an owiginaw w-wowk of a-authowship. OwO fow t-the puwposes 44 | of this wicense, (˘ω˘) d-dewivative wowks shaww nyot incwude w-wowks that w-wemain 45 | sepawabwe f-fwom, (///ˬ///✿) ow mewewy wink (ow bind b-by nyame) to the i-intewfaces of, UwU 46 | the wowk and d-dewivative wowks t-theweof. 47 | 48 | "contwibution" shaww m-mean any wowk o-of authowship, (⑅˘꒳˘) i-incwuding 49 | the owiginaw vewsion of the wowk a-and any modifications ow additions 50 | t-to that wowk ow dewivative wowks theweof, >w< that is intentionawwy 51 | submitted to wicensow fow incwusion in t-the wowk by the c-copywight ownew 52 | ow by an individuaw ow wegaw e-entity authowized t-to submit on behawf o-of 53 | the copywight ownew. o.O fow the puwposes o-of this definition, "submitted" 54 | means any fowm o-of ewectwonic, (U ᵕ U❁) v-vewbaw, (///ˬ///✿) ow wwitten communication s-sent 55 | to the w-wicensow ow its w-wepwesentatives, (ꈍᴗꈍ) incwuding but nyot wimited to 56 | communication on ewectwonic m-maiwing wists, rawr x3 souwce code contwow s-systems, ʘwʘ 57 | a-and issue twacking systems that awe managed by, ( ͡o ω ͡o ) o-ow on behawf of, rawr x3 t-the 58 | wicensow fow the puwpose of discussing and i-impwoving the wowk, UwU but 59 | excwuding communication that is conspicuouswy m-mawked ow othewwise 60 | d-designated in w-wwiting by the c-copywight ownew as "not a contwibution." 61 | 62 | "contwibutow" shaww m-mean wicensow and a-any individuaw ow wegaw entity 63 | o-on behawf of w-whom a contwibution has been weceived by wicensow a-and 64 | subsequentwy incowpowated within the wowk. òωó 65 | 66 | 2. gwant of copywight wicense. OwO subject to t-the tewms and conditions of 67 | this wicense, òωó each contwibutow heweby gwants to y-you a pewpetuaw, òωó 68 | w-wowwdwide, -.- nyon-excwusive, ( ͡o ω ͡o ) nyo-chawge, UwU w-woyawty-fwee, σωσ i-iwwevocabwe 69 | c-copywight wicense to wepwoduce, σωσ p-pwepawe d-dewivative wowks o-of, (///ˬ///✿) 70 | pubwicwy dispway, o.O pubwicwy pewfowm, subwicense, >w< a-and distwibute t-the 71 | wowk and such dewivative w-wowks in s-souwce ow object fowm. σωσ 72 | 73 | 3. gwant of patent wicense. subject to the tewms and conditions o-of 74 | this w-wicense, rawr x3 each contwibutow heweby g-gwants to you a-a pewpetuaw, (˘ω˘) 75 | wowwdwide, >w< nyon-excwusive, òωó n-nyo-chawge, woyawty-fwee, -.- iwwevocabwe 76 | (except as stated in this s-section) patent wicense to make, UwU h-have made, (U ﹏ U) 77 | use, offew to seww, òωó seww, -.- impowt, and othewwise twansfew the wowk, (˘ω˘) 78 | whewe such wicense appwies onwy to those patent cwaims wicensabwe 79 | by such contwibutow that a-awe nyecessawiwy infwinged by t-theiw 80 | contwibution(s) awone ow by combination o-of theiw contwibution(s) 81 | with t-the wowk to which such contwibution(s) w-was submitted. rawr x3 i-if you 82 | institute patent w-witigation against a-any entity (incwuding a-a 83 | c-cwoss-cwaim ow countewcwaim in a-a wawsuit) awweging t-that the wowk 84 | ow a contwibution incowpowated within the wowk constitutes d-diwect 85 | ow contwibutowy p-patent infwingement, rawr x3 then any patent wicenses 86 | gwanted t-to you undew t-this wicense fow that wowk shaww t-tewminate 87 | as of the date such witigation is f-fiwed. OwO 88 | 89 | 4. wedistwibution. o.O you m-may wepwoduce and distwibute copies of the 90 | wowk ow dewivative w-wowks theweof in a-any medium, (⑅˘꒳˘) with o-ow without 91 | modifications, ( ͡o ω ͡o ) and in souwce ow object fowm, (˘ω˘) pwovided that you 92 | m-meet the fowwowing c-conditions: 93 | 94 | (a) y-you must g-give any othew wecipients of the wowk ow 95 | dewivative wowks a copy of this w-wicense; and 96 | 97 | (b) y-you must cause any modified f-fiwes to cawwy p-pwominent nyotices 98 | stating t-that you changed t-the fiwes; a-and 99 | 100 | (c) you must wetain, OwO in the souwce fowm o-of any dewivative w-wowks 101 | t-that you distwibute, >w< a-aww copywight, (///ˬ///✿) p-patent, ( ͡o ω ͡o ) twademawk, and 102 | attwibution nyotices f-fwom the s-souwce fowm of the w-wowk, OwO 103 | excwuding those nyotices that do n-nyot pewtain to a-any pawt of 104 | t-the dewivative w-wowks; and 105 | 106 | (d) i-if the wowk incwudes a "notice" t-text fiwe a-as pawt of its 107 | distwibution, (///ˬ///✿) t-then any dewivative wowks that y-you distwibute must 108 | incwude a-a weadabwe copy of the attwibution n-nyotices contained 109 | w-within such notice fiwe, excwuding those nyotices t-that do nyot 110 | p-pewtain to any pawt of the dewivative wowks, >w< i-in at weast one 111 | of the fowwowing pwaces: within a nyotice text fiwe distwibuted 112 | a-as pawt of the d-dewivative wowks; w-within the s-souwce fowm ow 113 | d-documentation, ʘwʘ if pwovided awong with the d-dewivative wowks; o-ow, (⑅˘꒳˘) 114 | within a dispway genewated b-by the dewivative wowks, (ꈍᴗꈍ) i-if and 115 | whewevew such thiwd-pawty n-nyotices nyowmawwy appeaw. (///ˬ///✿) t-the contents 116 | o-of the nyotice f-fiwe awe fow infowmationaw p-puwposes onwy a-and 117 | do nyot m-modify the wicense. (U ᵕ U❁) y-you may add youw own attwibution 118 | nyotices within dewivative wowks that you distwibute, rawr x3 a-awongside 119 | ow as an addendum to the nyotice text fwom the wowk, (⑅˘꒳˘) pwovided 120 | that such additionaw attwibution nyotices cannot be constwued 121 | as modifying the wicense. (ꈍᴗꈍ) 122 | 123 | you m-may add youw own copywight statement t-to youw modifications a-and 124 | m-may pwovide a-additionaw ow diffewent wicense tewms and conditions 125 | f-fow use, σωσ wepwoduction, ʘwʘ ow distwibution of youw modifications, ow 126 | fow a-any such dewivative wowks as a whowe, UwU pwovided youw u-use, ʘwʘ 127 | wepwoduction, ʘwʘ a-and distwibution of the wowk othewwise compwies with 128 | the conditions s-stated in this w-wicense. OwO 129 | 130 | 5. σωσ submission o-of contwibutions. u-unwess you expwicitwy s-state othewwise, (⑅˘꒳˘) 131 | a-any contwibution i-intentionawwy submitted fow i-incwusion in the wowk 132 | by you to the wicensow shaww be undew t-the tewms and conditions of 133 | this w-wicense, ( ͡o ω ͡o ) without any additionaw t-tewms ow conditions. (U ﹏ U) 134 | nyotwithstanding t-the a-above, (U ᵕ U❁) nyothing h-hewein shaww supewsede o-ow modify 135 | t-the tewms of a-any sepawate wicense a-agweement you may have exekawaii~d 136 | w-with w-wicensow wegawding such contwibutions. (///ˬ///✿) 137 | 138 | 6. t-twademawks. σωσ t-this wicense does not gwant p-pewmission t-to use the twade 139 | nyames, rawr x3 twademawks, òωó s-sewvice m-mawks, OwO ow pwoduct nyames of the wicensow, ʘwʘ 140 | except as wequiwed f-fow weasonabwe and c-customawy use in descwibing the 141 | o-owigin of t-the wowk and wepwoducing the content o-of the nyotice fiwe. (ꈍᴗꈍ) 142 | 143 | 7. discwaimew of wawwanty. ( ͡o ω ͡o ) u-unwess wequiwed b-by appwicabwe waw ow 144 | agweed to in wwiting, UwU w-wicensow pwovides t-the wowk (and e-each 145 | contwibutow pwovides its contwibutions) on an "as is" basis, σωσ 146 | without w-wawwanties ow c-conditions of a-any kind, (U ﹏ U) eithew expwess ow 147 | impwied, (///ˬ///✿) incwuding, (˘ω˘) without wimitation, (˘ω˘) any wawwanties ow conditions 148 | o-of titwe, ʘwʘ nyon-infwingement, (U ﹏ U) m-mewchantabiwity, (ꈍᴗꈍ) o-ow fitness f-fow a 149 | pawticuwaw puwpose. (U ﹏ U) you a-awe sowewy wesponsibwe f-fow detewmining t-the 150 | appwopwiateness of u-using ow wedistwibuting the wowk and assume any 151 | w-wisks associated with youw exewcise of pewmissions u-undew this wicense. ʘwʘ 152 | 153 | 8. rawr x3 w-wimitation of wiabiwity. (U ﹏ U) i-in nyo e-event and undew n-no wegaw theowy, òωó 154 | whethew in towt (incwuding nyegwigence), (U ᵕ U❁) contwact, (U ᵕ U❁) o-ow othewwise, σωσ 155 | u-unwess wequiwed b-by appwicabwe w-waw (such as dewibewate and g-gwosswy 156 | nyegwigent acts) ow a-agweed to in wwiting, -.- s-shaww any contwibutow be 157 | w-wiabwe to you fow damages, rawr x3 incwuding any diwect, o.O indiwect, (˘ω˘) speciaw, OwO 158 | incidentaw, ow consequentiaw d-damages of any chawactew awising as a 159 | wesuwt of this wicense o-ow out of the use ow inabiwity t-to use the 160 | w-wowk (incwuding but nyot wimited to damages fow woss of goodwiww, σωσ 161 | wowk stoppage, òωó c-computew f-faiwuwe ow mawfunction, (ꈍᴗꈍ) ow any and aww 162 | othew commewciaw damages ow wosses), o.O even if such contwibutow 163 | has b-been advised of the possibiwity of such damages. UwU 164 | 165 | 9. accepting wawwanty o-ow additionaw w-wiabiwity. (ꈍᴗꈍ) whiwe wedistwibuting 166 | t-the wowk o-ow dewivative wowks theweof, ( ͡o ω ͡o ) you may choose to offew, ʘwʘ 167 | and chawge a-a fee fow, rawr x3 acceptance of suppowt, (⑅˘꒳˘) w-wawwanty, ( ͡o ω ͡o ) i-indemnity, òωó 168 | ow othew wiabiwity o-obwigations and/ow wights consistent with this 169 | w-wicense. ʘwʘ howevew, (ꈍᴗꈍ) i-in accepting such obwigations, òωó you may act o-onwy 170 | on youw o-own behawf and o-on youw sowe wesponsibiwity, nyot on behawf 171 | of any othew contwibutow, (U ﹏ U) a-and onwy i-if you agwee to indemnify, (˘ω˘) 172 | defend, and howd each contwibutow h-hawmwess fow any wiabiwity 173 | incuwwed by, (˘ω˘) ow c-cwaims assewted a-against, (///ˬ///✿) such contwibutow b-by weason 174 | of youw accepting any such wawwanty ow additionaw w-wiabiwity. (///ˬ///✿) 175 | 176 | end of tewms and conditions 177 | 178 | a-appendix: how to appwy the apache w-wicense to youw wowk. UwU 179 | 180 | to appwy the apache wicense to youw wowk, -.- attach t-the fowwowing 181 | b-boiwewpwate nyotice, >w< w-with the fiewds e-encwosed by b-bwackets "[]" 182 | wepwaced with youw own identifying i-infowmation. (ꈍᴗꈍ) (don't i-incwude 183 | t-the bwackets!) t-the text shouwd b-be encwosed in the appwopwiate 184 | comment syntax fow the fiwe f-fowmat. rawr x3 we awso w-wecommend that a-a 185 | fiwe ow cwass n-name and descwiption of puwpose b-be incwuded o-on the 186 | same "pwinted p-page" as t-the copywight n-nyotice fow easiew 187 | identification within thiwd-pawty a-awchives. (⑅˘꒳˘) 188 | 189 | copywight [yyyy] [name of copywight ownew] 190 | 191 | wicensed u-undew the a-apache wicense, rawr x3 v-vewsion 2.0 (the "wicense"); 192 | you m-may nyot use t-this fiwe except i-in compwiance with t-the wicense. o.O 193 | you may obtain a copy of the wicense a-at 194 | 195 | http://www.apache.owg/wicenses/wicense-2.0 196 | 197 | unwess wequiwed b-by appwicabwe w-waw ow agweed to in wwiting, -.- softwawe 198 | distwibuted u-undew the wicense is distwibuted on an "as is" basis, rawr x3 199 | without wawwanties o-ow conditions of a-any kind, rawr x3 eithew expwess ow impwied. (˘ω˘) 200 | s-see the wicense fow the specific wanguage govewning pewmissions a-and 201 | wimitations u-undew the w-wicense. σωσ 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any 2 | person obtaining a copy of this software and associated 3 | documentation files (the "Software"), to deal in the 4 | Software without restriction, including without 5 | limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software 8 | is furnished to do so, subject to the following 9 | conditions: 10 | 11 | The above copyright notice and this permission notice 12 | shall be included in all copies or substantial portions 13 | of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 17 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 18 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 19 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /LICENSE-MIT-UWU: -------------------------------------------------------------------------------- 1 | pewmission is heweby g-gwanted, òωó fwee o-of chawge, OwO to any 2 | pewson obtaining a-a copy of this softwawe and a-associated 3 | documentation fiwes (the "softwawe"), o.O t-to deaw in the 4 | softwawe without westwiction, -.- incwuding w-without 5 | wimitation the w-wights to use, rawr x3 copy, ( ͡o ω ͡o ) m-modify, mewge, (⑅˘꒳˘) 6 | p-pubwish, distwibute, σωσ subwicense, ( ͡o ω ͡o ) and/ow seww copies of 7 | the softwawe, òωó and to pewmit pewsons to w-whom the softwawe 8 | is fuwnished to do so, o.O subject to the fowwowing 9 | conditions: 10 | 11 | t-the above copywight n-nyotice and this pewmission n-nyotice 12 | shaww be incwuded in aww copies ow substantiaw powtions 13 | o-of the softwawe. òωó 14 | 15 | the softwawe i-is pwovided "as i-is", (ꈍᴗꈍ) without wawwanty o-of 16 | any kind, o.O e-expwess ow impwied, (U ᵕ U❁) incwuding b-but nyot wimited 17 | to the wawwanties of mewchantabiwity, σωσ f-fitness f-fow a 18 | pawticuwaw p-puwpose and nyoninfwingement. UwU in nyo event 19 | shaww the authows ow copywight howdews b-be wiabwe fow any 20 | cwaim, >w< damages o-ow othew wiabiwity, rawr x3 whethew in an action 21 | of contwact, (U ᵕ U❁) towt ow othewwise, (˘ω˘) awising f-fwom, o.O out of ow 22 | in connection with the softwawe o-ow the use ow othew 23 | deawings in the softwawe. o.O 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | uwubot 2 | ====== 3 | 4 | [![Build Status][actions-badge]][actions-url] 5 | [![Latest Version](https://img.shields.io/crates/v/uwubot.svg)](https://crates.io/crates/uwubot) 6 | [![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/uwubot) 7 | 8 | [actions-badge]: https://github.com/yaahc/uwubot/workflows/Continuous%20integration/badge.svg 9 | [actions-url]: https://github.com/yaahc/uwubot/actions?query=workflow%3A%22Continuous+integration%22 10 | 11 | This crate defines a discord bot using [`serenity`] for uwuifying text via [`uwuify`]. 12 | 13 | ## Installation 14 | 15 | You can install uwubot from source or from `crates.io` 16 | 17 | ``` 18 | cargo install uwubot 19 | ``` 20 | 21 | ## Usage / Bot Setup 22 | 23 | You can setup your own instance of uwubot using the following steps: 24 | 25 | 1. create a new bot in the [discord developer portal] 26 | 1. copy the client-id and bot token from the new bot 27 | 1. run uwubot with `uwubot --client-id ` 28 | 1. create a url with the `applications.commands` oauth2 scope on the `OAuth2` tab of the developer portal 29 | 1. navigate to the generated URL to register your bot on your server of choice 30 | 31 | ### Docker Instance 32 | 33 | Alternatively you can try to run `uwubot` with the provided `Dockerfile`. The `bot-token` and `client-id` args can be set via the `BOT_TOKEN` or `CLIENT_ID` environment variables. 34 | 35 | ``` 36 | docker build -t uwubot . 37 | docker run -it --rm --env BOT_TOKEN="" --env CLIENT_ID= --name uwubot-running uwubot 38 | ``` 39 | 40 | ## Additional Details 41 | 42 | `uwubot` allows you to either register global commands or guild commands. To register a guild command you'll need to figure out your discord server's guild ID. I'll try to add an easy way to export this in `uwubot` in the future but for now you're on you're own, I'm sowwy >_<. 43 | 44 | Guild commands have the advantage of being instantly updated, where as global commands are cached with a 1 hour update rate. 45 | 46 | [`uwuify`]: https://docs.rs/uwuify 47 | [`serenity`]: https://docs.rs/serenity 48 | [discord developer portal]: https://discord.com/developers/applications 49 | 50 | #### License 51 | 52 | 53 | Licensed under either of Apache License, Version 54 | 2.0 or MIT license at your option. 55 | 56 | 57 |
58 | 59 | 60 | Unless you explicitly state otherwise, any contribution intentionally submitted 61 | for inclusion in this crate by you, as defined in the Apache-2.0 license, shall 62 | be dual licensed as above, without any additional terms or conditions. 63 | 64 | -------------------------------------------------------------------------------- /src/bot.rs: -------------------------------------------------------------------------------- 1 | use crate::Config; 2 | use color_eyre::eyre; 3 | use serenity::{ 4 | builder::CreateInteraction, 5 | http::Http, 6 | model::{ 7 | id::GuildId, 8 | interactions::{ApplicationCommandOptionType, Interaction}, 9 | }, 10 | prelude::*, 11 | }; 12 | 13 | mod event_handler; 14 | 15 | /// The bot, the myth, the legend, uwubot 16 | pub struct Bot { 17 | config: Config, 18 | } 19 | 20 | impl Bot { 21 | /// Construct an uwubot given a config type that can be converted into 22 | /// `uwubot::Config`. 23 | pub fn new(config: T) -> Self 24 | where 25 | Config: From, 26 | { 27 | let config = Config::from(config); 28 | Self { config } 29 | } 30 | 31 | /// Run uwubot. 32 | pub async fn run(&self) -> eyre::Result<()> { 33 | let mut client = Client::builder(self.token()) 34 | .event_handler(self.handler()) 35 | .await?; 36 | 37 | client.start().await?; 38 | 39 | Ok(()) 40 | } 41 | 42 | fn token(&self) -> &str { 43 | &self.config.bot_token 44 | } 45 | 46 | fn handler(&self) -> event_handler::Handler { 47 | event_handler::Handler 48 | } 49 | 50 | fn application_id(&self) -> u64 { 51 | self.config.client_id 52 | } 53 | 54 | // Commands registered here are handled in the `event_handlers` module 55 | 56 | /// Register a slash command for a given Guild. 57 | pub async fn register_slash_commands_guild(&self, guild_id: GuildId) -> eyre::Result<()> { 58 | let http = Http::new_with_token(self.token()); 59 | 60 | Interaction::create_guild_application_command( 61 | http, 62 | guild_id, 63 | self.application_id(), 64 | Self::uwuify_command, 65 | ) 66 | .await?; 67 | 68 | Ok(()) 69 | } 70 | 71 | /// List all slash commands for a given Guild. 72 | pub async fn list_slash_commands_guild(&self, guild_id: GuildId) -> eyre::Result<()> { 73 | let http = Http::new_with_token(self.token()); 74 | 75 | let guild_cmds = http 76 | .get_guild_application_commands(self.application_id(), guild_id.0) 77 | .await?; 78 | 79 | dbg!(guild_cmds); 80 | 81 | Ok(()) 82 | } 83 | 84 | /// Delete a slash command for a given Guild. 85 | pub async fn delete_slash_commands_guild( 86 | &self, 87 | guild_id: GuildId, 88 | command_id: u64, 89 | ) -> eyre::Result<()> { 90 | let http = Http::new_with_token(self.token()); 91 | 92 | http.delete_guild_application_command(self.application_id(), guild_id.0, command_id) 93 | .await?; 94 | 95 | println!("{}", crate::uwu::uwuify("command deleted ^_^")); 96 | 97 | Ok(()) 98 | } 99 | 100 | /// Register a slash command globally for all guilds. 101 | /// 102 | /// # Details 103 | /// 104 | /// Global commands are cached with a 1 hour update interval, it is 105 | /// recommended that you use `register_slash_commands_guild` when testing. 106 | pub async fn register_slash_commands_global(&self) -> eyre::Result<()> { 107 | let http = Http::new_with_token(self.token()); 108 | 109 | Interaction::create_global_application_command( 110 | http, 111 | self.application_id(), 112 | Self::uwuify_command, 113 | ) 114 | .await?; 115 | 116 | Ok(()) 117 | } 118 | 119 | fn uwuify_command(interaction: &mut CreateInteraction) -> &mut CreateInteraction { 120 | interaction 121 | .name("uwuify") 122 | .description("uwuify an impowtant m-message") 123 | .create_interaction_option(|option| { 124 | option 125 | .name("text") 126 | .description("text to be uwuified") 127 | .kind(ApplicationCommandOptionType::String) 128 | .required(true) 129 | }) 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/bot/event_handler.rs: -------------------------------------------------------------------------------- 1 | use crate::uwu::uwuify; 2 | use crate::ResultExt; 3 | use serenity::{ 4 | async_trait, 5 | model::{ 6 | gateway::Ready, 7 | interactions::{Interaction, InteractionResponseType}, 8 | }, 9 | prelude::*, 10 | }; 11 | 12 | pub struct Handler; 13 | 14 | impl Handler { 15 | async fn handle_uwuify(&self, ctx: Context, interaction: Interaction) { 16 | let data = interaction.data.as_ref().unwrap(); 17 | let option = &data.options[0]; 18 | 19 | assert_eq!("text", option.name); 20 | 21 | let value = option 22 | .value 23 | .as_ref() 24 | .expect("text is a required argument") 25 | .as_str() 26 | .expect("text is always a String type"); 27 | 28 | let uwud = uwuify(value); 29 | 30 | let http = &ctx.http; 31 | 32 | interaction 33 | .create_interaction_response(http, |response| { 34 | response 35 | .kind(InteractionResponseType::ChannelMessageWithSource) 36 | .interaction_response_data(|data| data.content(uwud)) 37 | }) 38 | .await 39 | .unwrap_or_report(); 40 | } 41 | } 42 | 43 | #[async_trait] 44 | impl EventHandler for Handler { 45 | async fn ready(&self, _: Context, ready: Ready) { 46 | println!("{} is connected!", ready.user.name); 47 | } 48 | 49 | async fn interaction_create(&self, ctx: Context, interaction: Interaction) { 50 | if let Some(data) = &interaction.data { 51 | match data.name.as_str() { 52 | "uwuify" => self.handle_uwuify(ctx, interaction).await, 53 | _ => { 54 | println!("unknown interaction"); 55 | dbg!(&interaction); 56 | } 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | /// Uwubot configuration values 2 | pub struct Config { 3 | /// Discord Bot's Token 4 | pub bot_token: String, 5 | /// Discord Bot Client ID to register slash commands for 6 | pub client_id: u64, 7 | } 8 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Uwuifying discord bot for conveniently uwuifying text with friends 2 | #![doc(html_root_url = "https://docs.rs/uwubot/0.3.0")] 3 | #![cfg_attr(docsrs, feature(doc_cfg))] 4 | #![warn( 5 | rust_2018_idioms, 6 | missing_docs, 7 | bad_style, 8 | const_err, 9 | dead_code, 10 | improper_ctypes, 11 | non_shorthand_field_patterns, 12 | no_mangle_generic_items, 13 | overflowing_literals, 14 | path_statements, 15 | patterns_in_fns_without_body, 16 | private_in_public, 17 | unconditional_recursion, 18 | unused, 19 | unused_allocation, 20 | unused_comparisons, 21 | unused_parens, 22 | while_true 23 | )] 24 | #![allow(clippy::try_err)] 25 | 26 | mod bot; 27 | mod config; 28 | mod uwu; 29 | 30 | pub use bot::Bot; 31 | pub use config::Config; 32 | 33 | trait ResultExt { 34 | fn unwrap_or_report(self); 35 | } 36 | 37 | impl ResultExt for Result<(), E> 38 | where 39 | eyre::Report: From, 40 | { 41 | fn unwrap_or_report(self) { 42 | if let Err(e) = self { 43 | let e = eyre::Report::from(e); 44 | eprintln!("Error: {:?}", e); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use color_eyre::eyre; 2 | use serenity::model::id::GuildId; 3 | use structopt::StructOpt; 4 | use uwubot::{Bot, Config}; 5 | 6 | #[derive(Debug, StructOpt)] 7 | struct Args { 8 | /// Discord Bot's token 9 | #[structopt(env)] 10 | bot_token: String, 11 | 12 | /// Discord Bot Client ID to register slash commands for 13 | #[structopt(short, long, env)] 14 | client_id: u64, 15 | 16 | #[structopt(subcommand)] 17 | subcommand: Option, 18 | } 19 | 20 | #[derive(Debug, StructOpt)] 21 | enum Subcommand { 22 | /// Commands for manipulating guild specific slash commands 23 | Guild(GuildSubcommand), 24 | } 25 | 26 | #[derive(Debug, StructOpt)] 27 | enum GuildSubcommand { 28 | /// Register slash commands for a given guild 29 | Register { 30 | /// Discord guild ID to register slash commands for 31 | #[structopt(short, long, env)] 32 | guild_id: u64, 33 | }, 34 | /// Delete slash commands for a given guild 35 | Delete { 36 | /// Discord guild ID to delete slash command for 37 | #[structopt(short, long, env)] 38 | guild_id: u64, 39 | 40 | /// Discord command ID to delete 41 | #[structopt(short, long, env)] 42 | command_id: u64, 43 | }, 44 | /// List all slash commands registered for a given guild 45 | Get { 46 | /// Discord guild ID to delete slash commands for 47 | #[structopt(short, long, env)] 48 | guild_id: u64, 49 | }, 50 | } 51 | 52 | impl From for Config { 53 | fn from(args: Args) -> Self { 54 | let Args { 55 | bot_token, 56 | client_id, 57 | .. 58 | } = args; 59 | 60 | Self { 61 | bot_token, 62 | client_id, 63 | } 64 | } 65 | } 66 | 67 | #[tokio::main] 68 | async fn main() -> eyre::Result<()> { 69 | color_eyre::install()?; 70 | 71 | let mut config = Args::from_args(); 72 | let subcmd = config.subcommand.take(); 73 | let bot = Bot::new(config); 74 | 75 | match subcmd { 76 | Some(Subcommand::Guild(GuildSubcommand::Register { guild_id })) => { 77 | bot.register_slash_commands_guild(GuildId(guild_id)).await? 78 | } 79 | Some(Subcommand::Guild(GuildSubcommand::Delete { 80 | guild_id, 81 | command_id, 82 | })) => { 83 | bot.delete_slash_commands_guild(GuildId(guild_id), command_id) 84 | .await?; 85 | return Ok(()); 86 | } 87 | Some(Subcommand::Guild(GuildSubcommand::Get { guild_id })) => { 88 | bot.list_slash_commands_guild(GuildId(guild_id)).await?; 89 | return Ok(()); 90 | } 91 | None => bot.register_slash_commands_global().await?, 92 | } 93 | 94 | bot.run().await?; 95 | 96 | Ok(()) 97 | } 98 | -------------------------------------------------------------------------------- /src/uwu.rs: -------------------------------------------------------------------------------- 1 | use uwuifier::uwuify_str_sse; 2 | 3 | pub fn uwuify(input: &str) -> String { 4 | uwuify_str_sse(input) 5 | } 6 | 7 | #[cfg(test)] 8 | mod tests { 9 | use super::*; 10 | 11 | #[test] 12 | fn uwufiy() { 13 | let input = "this is an extremely important bot and I expect it to have a major impact on human culture."; 14 | let expected = "this is an extwemewy i-impowtant bot a-and i expect it to have a majow i-impact on human cuwtuwe."; 15 | 16 | let output = uwuify(input); 17 | 18 | assert_eq!(expected, output); 19 | } 20 | } 21 | --------------------------------------------------------------------------------