Compare commits

...

18 commits

Author SHA1 Message Date
RenovateBot 6f130b4dc4 Update dependency typescript to v5.4.2
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
2024-03-11 00:03:59 +00:00
Ethan Lane cca34a476c Merge branch 'main' into develop
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:27:57 +00:00
Ethan Lane ad2e4d8f9b v3.2.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:26:37 +00:00
Ethan Lane c83a2329cc 3.2.1 2024-03-01 18:26:31 +00:00
Ethan Lane 5f054b02a5 Add cache helper to update user cache every 30 minutes
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:25:24 +00:00
Ethan Lane 808f5e3b1c Resolve undici version to fix vulnerability 2024-03-01 17:31:29 +00:00
RenovateBot 68f29c814a Update dependency @types/uuid to v9.0.8 (#399)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | dependencies | patch | [`9.0.7` -> `9.0.8`](https://renovatebot.com/diffs/npm/@types%2fuuid/9.0.7/9.0.8) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/399
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-01-30 18:31:20 +00:00
RenovateBot 96bd4ef83e Update dependency dotenv to v16.4.1 (#397)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [dotenv](https://github.com/motdotla/dotenv) | dependencies | minor | [`16.3.1` -> `16.4.1`](https://renovatebot.com/diffs/npm/dotenv/16.3.1/16.4.1) |

---

### Release Notes

<details>
<summary>motdotla/dotenv (dotenv)</summary>

### [`v16.4.1`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1641-2024-01-24)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.4.0...v16.4.1)

-   Patch support for array as `path` option [#&#8203;797](https://github.com/motdotla/dotenv/pull/797)

### [`v16.4.0`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1640-2024-01-23)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.3.2...v16.4.0)

-   Add `error.code` to error messages around `.env.vault` decryption handling [#&#8203;795](https://github.com/motdotla/dotenv/pull/795)
-   Add ability to find `.env.vault` file when filename(s) passed as an array [#&#8203;784](https://github.com/motdotla/dotenv/pull/784)

### [`v16.3.2`](https://github.com/motdotla/dotenv/blob/HEAD/CHANGELOG.md#1632-2024-01-18)

[Compare Source](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.3.2)

##### Added

-   Add debug message when no encoding set [#&#8203;735](https://github.com/motdotla/dotenv/pull/735)

##### Changed

-   Fix output typing for `populate` [#&#8203;792](https://github.com/motdotla/dotenv/pull/792)
-   Use subarray instead of slice [#&#8203;793](https://github.com/motdotla/dotenv/pull/793)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/397
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-01-30 18:30:42 +00:00
RenovateBot c201d10d07 Update dependency typeorm to v0.3.20 (#395)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [typeorm](https://typeorm.io) ([source](https://github.com/typeorm/typeorm)) | dependencies | patch | [`0.3.17` -> `0.3.20`](https://renovatebot.com/diffs/npm/typeorm/0.3.17/0.3.20) |

---

### Release Notes

<details>
<summary>typeorm/typeorm (typeorm)</summary>

### [`v0.3.20`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0320-2024-01-26)

[Compare Source](https://github.com/typeorm/typeorm/compare/0.3.19...0.3.20)

##### Bug Fixes

-   added missing parentheses in where conditions ([#&#8203;10650](https://github.com/typeorm/typeorm/issues/10650)) ([4624930](46249303be)), closes [#&#8203;10534](https://github.com/typeorm/typeorm/issues/10534)
-   don't escape indexPredicate ([#&#8203;10618](https://github.com/typeorm/typeorm/issues/10618)) ([dd49a25](dd49a254dc))
-   fallback runMigrations transaction to DataSourceOptions ([#&#8203;10601](https://github.com/typeorm/typeorm/issues/10601)) ([0cab0dd](0cab0dd730))
-   hangup when load relations with relationLoadStrategy: query ([#&#8203;10630](https://github.com/typeorm/typeorm/issues/10630)) ([54d8d9e](54d8d9efe9)), closes [#&#8203;10481](https://github.com/typeorm/typeorm/issues/10481)
-   include asExpression columns in returning clause ([#&#8203;10632](https://github.com/typeorm/typeorm/issues/10632)) ([f232ba7](f232ba7808)), closes [#&#8203;8450](https://github.com/typeorm/typeorm/issues/8450) [#&#8203;8450](https://github.com/typeorm/typeorm/issues/8450)
-   multiple insert in SAP Hana ([#&#8203;10597](https://github.com/typeorm/typeorm/issues/10597)) ([1b34c9a](1b34c9a49e))
-   resolve issue CREATE/DROP Index concurrently ([#&#8203;10634](https://github.com/typeorm/typeorm/issues/10634)) ([8aa8690](8aa8690f94)), closes [#&#8203;10626](https://github.com/typeorm/typeorm/issues/10626)
-   type inferencing of EntityManager#create ([#&#8203;10569](https://github.com/typeorm/typeorm/issues/10569)) ([99d8249](99d8249e45))

##### Features

-   add json type support for Oracle ([#&#8203;10611](https://github.com/typeorm/typeorm/issues/10611)) ([7e85460](7e85460f10))
-   add postgres multirange column types ([#&#8203;10627](https://github.com/typeorm/typeorm/issues/10627)) ([d0b7670](d0b76703cc)), closes [#&#8203;10556](https://github.com/typeorm/typeorm/issues/10556)
-   add table comment for postgres ([#&#8203;10613](https://github.com/typeorm/typeorm/issues/10613)) ([4493db4](4493db4d1b))

##### Reverts

-   Revert "fix: prevent using absolute table path in migrations unless required ([#&#8203;10123](https://github.com/typeorm/typeorm/issues/10123))" ([#&#8203;10624](https://github.com/typeorm/typeorm/issues/10624)) ([8f371f2](8f371f2397)), closes [#&#8203;10123](https://github.com/typeorm/typeorm/issues/10123) [#&#8203;10624](https://github.com/typeorm/typeorm/issues/10624)
-   revert "feat: nullable embedded entities ([#&#8203;10289](https://github.com/typeorm/typeorm/issues/10289))" ([#&#8203;10614](https://github.com/typeorm/typeorm/issues/10614)) ([15de46f](15de46fd5d)), closes [#&#8203;10289](https://github.com/typeorm/typeorm/issues/10289) [#&#8203;10614](https://github.com/typeorm/typeorm/issues/10614)

### [`v0.3.19`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0319-2024-01-03)

[Compare Source](https://github.com/typeorm/typeorm/compare/0.3.18...0.3.19)

##### Bug Fixes

-   fixed `Cannot read properties of undefined (reading 'sync')` caused after glob package upgrade

### [`v0.3.18`](https://github.com/typeorm/typeorm/blob/HEAD/CHANGELOG.md#0318-2024-01-03)

[Compare Source](https://github.com/typeorm/typeorm/compare/0.3.17...0.3.18)

##### Bug Fixes

-   add BaseEntity to model-shim ([#&#8203;10503](https://github.com/typeorm/typeorm/issues/10503)) ([3cf938e](3cf938efc0))
-   add error handling for missing join columns ([#&#8203;10525](https://github.com/typeorm/typeorm/issues/10525)) ([122c897](122c897a2f)), closes [#&#8203;7034](https://github.com/typeorm/typeorm/issues/7034)
-   add missing export for View class ([#&#8203;10261](https://github.com/typeorm/typeorm/issues/10261)) ([7adbc9b](7adbc9bdc7))
-   added fail callback while opening the database in Cordova ([#&#8203;10566](https://github.com/typeorm/typeorm/issues/10566)) ([8b4df5b](8b4df5b299))
-   aggregate function throw error when column alias name is set ([#&#8203;10035](https://github.com/typeorm/typeorm/issues/10035)) ([022d2b5](022d2b5f62)), closes [#&#8203;9927](https://github.com/typeorm/typeorm/issues/9927)
-   backport postgres connection error handling to crdb ([#&#8203;10177](https://github.com/typeorm/typeorm/issues/10177)) ([149226d](149226dd67))
-   bump better-sqlite3 version range ([#&#8203;10452](https://github.com/typeorm/typeorm/issues/10452)) ([75ec8f2](75ec8f2032))
-   caching always enabled not caching queries ([#&#8203;10524](https://github.com/typeorm/typeorm/issues/10524)) ([8af533f](8af533f79f))
-   circular dependency breaking node.js 20.6 ([#&#8203;10344](https://github.com/typeorm/typeorm/issues/10344)) ([ba7ad3c](ba7ad3c69b)), closes [#&#8203;10338](https://github.com/typeorm/typeorm/issues/10338)
-   correctly keep query.data from ormOption for commit / rollback subscribers ([#&#8203;10151](https://github.com/typeorm/typeorm/issues/10151)) ([73ee70b](73ee70b331))
-   default value in child table/entity column decorator for multiple table inheritance is ignored for inherited columns ([#&#8203;10563](https://github.com/typeorm/typeorm/issues/10563)) ([#&#8203;10564](https://github.com/typeorm/typeorm/issues/10564)) ([af77a5d](af77a5d0ac))
-   deletedAt column leaking as side effect of object update while creating a row ([#&#8203;10435](https://github.com/typeorm/typeorm/issues/10435)) ([7de4890](7de4890265))
-   empty objects being hydrated when eager loading relations that have a `@VirtualColumn` ([#&#8203;10432](https://github.com/typeorm/typeorm/issues/10432)) ([b53e410](b53e410e5a)), closes [#&#8203;10431](https://github.com/typeorm/typeorm/issues/10431)
-   extend GiST index with range types for Postgres driver ([#&#8203;10572](https://github.com/typeorm/typeorm/issues/10572)) ([a4900ae](a4900ae15f)), closes [#&#8203;10567](https://github.com/typeorm/typeorm/issues/10567)
-   ignore changes for columns with `update: false` in persistence ([#&#8203;10250](https://github.com/typeorm/typeorm/issues/10250)) ([f8fa1fd](f8fa1fd821)), closes [#&#8203;10249](https://github.com/typeorm/typeorm/issues/10249)
-   improve helper for cli for commands missing positionals ([#&#8203;10133](https://github.com/typeorm/typeorm/issues/10133)) ([9f8899f](9f8899f56c))
-   loading datasource unable to process a regular default export ([#&#8203;10184](https://github.com/typeorm/typeorm/issues/10184)) ([201342d](201342d150)), closes [#&#8203;8810](https://github.com/typeorm/typeorm/issues/8810)
-   logMigration has incorrect logging condition ([#&#8203;10323](https://github.com/typeorm/typeorm/issues/10323)) ([d41930f](d41930f0d6)), closes [#&#8203;10322](https://github.com/typeorm/typeorm/issues/10322) [#&#8203;10322](https://github.com/typeorm/typeorm/issues/10322)
-   ManyToMany ER_DUP_ENTRY error ([#&#8203;10343](https://github.com/typeorm/typeorm/issues/10343)) ([e296063](e296063b12)), closes [#&#8203;5704](https://github.com/typeorm/typeorm/issues/5704)
-   migrations on indexed TIMESTAMP WITH TIME ZONE Oracle columns ([#&#8203;10506](https://github.com/typeorm/typeorm/issues/10506)) ([cf37f13](cf37f1370b)), closes [#&#8203;10493](https://github.com/typeorm/typeorm/issues/10493)
-   mongodb - undefined is not constructor ([#&#8203;10559](https://github.com/typeorm/typeorm/issues/10559)) ([ad5bf11](ad5bf11a91))
-   mongodb resolves leaked cursor ([#&#8203;10316](https://github.com/typeorm/typeorm/issues/10316)) ([2dc9624](2dc9624d00)), closes [#&#8203;10315](https://github.com/typeorm/typeorm/issues/10315)
-   mssql datasource testonborrow not affecting anything ([#&#8203;10589](https://github.com/typeorm/typeorm/issues/10589)) ([122b683](122b683840))
-   nested transactions issues ([#&#8203;10210](https://github.com/typeorm/typeorm/issues/10210)) ([25e6ecd](25e6ecdfd2))
-   prevent using absolute table path in migrations unless required ([#&#8203;10123](https://github.com/typeorm/typeorm/issues/10123)) ([dd59524](dd595242a7))
-   remove `date-fns` in favor of `DayJs` ([#&#8203;10306](https://github.com/typeorm/typeorm/issues/10306)) ([cf7147f](cf7147fa7c))
-   remove dynamic require calls ([#&#8203;10196](https://github.com/typeorm/typeorm/issues/10196)) ([a939654](a939654c95))
-   resolve circular dependency when using Vite ([#&#8203;10273](https://github.com/typeorm/typeorm/issues/10273)) ([080528b](080528b117))
-   resolve issue building eager relation alias for nested relations ([#&#8203;10004](https://github.com/typeorm/typeorm/issues/10004)) ([c6f608d](c6f608d3e8)), closes [#&#8203;9944](https://github.com/typeorm/typeorm/issues/9944)
-   resolve issue of generating migration for numeric arrays repeatedly ([#&#8203;10471](https://github.com/typeorm/typeorm/issues/10471)) ([39fdcf6](39fdcf651f)), closes [#&#8203;10043](https://github.com/typeorm/typeorm/issues/10043)
-   resolve issue queryBuilder makes different parameter identifiers for same parameter ([#&#8203;10327](https://github.com/typeorm/typeorm/issues/10327)) ([6c918ea](6c918ea392)), closes [#&#8203;7308](https://github.com/typeorm/typeorm/issues/7308)
-   resolve issues on upsert ([#&#8203;10588](https://github.com/typeorm/typeorm/issues/10588)) ([dc1bfed](dc1bfed6d5)), closes [#&#8203;10587](https://github.com/typeorm/typeorm/issues/10587)
-   scrub all comment end markers from comments ([#&#8203;10163](https://github.com/typeorm/typeorm/issues/10163)) ([d937f61](d937f6106a))
-   serialize bigint when building a query id [#&#8203;10336](https://github.com/typeorm/typeorm/issues/10336) ([#&#8203;10337](https://github.com/typeorm/typeorm/issues/10337)) ([bfc1cc5](bfc1cc5ab4))
-   should automatically cache if alwaysEnable ([#&#8203;10137](https://github.com/typeorm/typeorm/issues/10137)) ([173910e](173910ed79)), closes [#&#8203;9910](https://github.com/typeorm/typeorm/issues/9910)
-   SQLite simple-enum column parsing ([#&#8203;10550](https://github.com/typeorm/typeorm/issues/10550)) ([696e688](696e688d00))
-   update UpdateDateColumn on upsert ([#&#8203;10458](https://github.com/typeorm/typeorm/issues/10458)) ([fdb9866](fdb9866ad2)), closes [#&#8203;9015](https://github.com/typeorm/typeorm/issues/9015)
-   upgrade ts-node version to latest(10.9.1) version ([#&#8203;10143](https://github.com/typeorm/typeorm/issues/10143)) ([fcb9904](fcb9904f24))
-   using async datasource to configure typeorm ([#&#8203;10170](https://github.com/typeorm/typeorm/issues/10170)) ([fbd45db](fbd45dba32))

##### Features

-   ability to change default replication mode ([#&#8203;10419](https://github.com/typeorm/typeorm/issues/10419)) ([72b1d1b](72b1d1b865))
-   add concurrent indexes for postgres ([#&#8203;10442](https://github.com/typeorm/typeorm/issues/10442)) ([f4e6eaf](f4e6eaf155))
-   add exists and exists by ([#&#8203;10291](https://github.com/typeorm/typeorm/issues/10291)) ([b6b46fb](b6b46fb133))
-   add isolated where statements ([#&#8203;10213](https://github.com/typeorm/typeorm/issues/10213)) ([3cda7ec](3cda7ec39d))
-   add MSSQL disableAsciiToUnicodeParamConversion option and tests ([#&#8203;10161](https://github.com/typeorm/typeorm/issues/10161)) ([df7c069](df7c06948c)), closes [#&#8203;10131](https://github.com/typeorm/typeorm/issues/10131)
-   add support for mssql server DefaultAzureCredential usage ([#&#8203;10246](https://github.com/typeorm/typeorm/issues/10246)) ([c8ee5b1](c8ee5b1d1a))
-   add support for table comment in MySQL ([#&#8203;10017](https://github.com/typeorm/typeorm/issues/10017)) ([338df16](338df16439))
-   allow to use custom type witch extends object type for find where argument ([#&#8203;10475](https://github.com/typeorm/typeorm/issues/10475)) ([48f5f85](48f5f85d68))
-   BeforeQuery and AfterQuery events ([#&#8203;10234](https://github.com/typeorm/typeorm/issues/10234)) ([5c28154](5c28154cbe)), closes [#&#8203;3302](https://github.com/typeorm/typeorm/issues/3302)
-   custom STI discriminator value for EntitySchema ([#&#8203;10508](https://github.com/typeorm/typeorm/issues/10508)) ([b240d87](b240d87f34)), closes [#&#8203;10494](https://github.com/typeorm/typeorm/issues/10494)
-   enabled CTE for oracle driver ([#&#8203;10319](https://github.com/typeorm/typeorm/issues/10319)) ([65858f3](65858f3a17))
-   entityId in InsertEvent ([#&#8203;10540](https://github.com/typeorm/typeorm/issues/10540)) ([ae006af](ae006af501))
-   expose countDocuments in mongodb ([#&#8203;10314](https://github.com/typeorm/typeorm/issues/10314)) ([ebd61d1](ebd61d1440))
-   exposed entity and criteria properties on EntityNotFoundError ([#&#8203;10202](https://github.com/typeorm/typeorm/issues/10202)) ([bafcd17](bafcd1709b))
-   implement column comments for SAP HANA ([#&#8203;10502](https://github.com/typeorm/typeorm/issues/10502)) ([45e31cc](45e31cc57a))
-   implement OR operator ([#&#8203;10086](https://github.com/typeorm/typeorm/issues/10086)) ([a00b1df](a00b1df68f)), closes [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054) [#&#8203;10054](https://github.com/typeorm/typeorm/issues/10054)
-   implement streaming for SAP HANA ([#&#8203;10512](https://github.com/typeorm/typeorm/issues/10512)) ([7e9cead](7e9cead8a3))
-   implements QueryFailedError generic for driverError typing ([#&#8203;10253](https://github.com/typeorm/typeorm/issues/10253)) ([78b2f48](78b2f4805c))
-   modify repository.extend method for chaining repositories ([#&#8203;10256](https://github.com/typeorm/typeorm/issues/10256)) ([ca29c0f](ca29c0ff8e))
-   nullable embedded entities ([#&#8203;10289](https://github.com/typeorm/typeorm/issues/10289)) ([e67d704](e67d704138))
-   support for MongoDB 6.x ([#&#8203;10545](https://github.com/typeorm/typeorm/issues/10545)) ([3647b26](3647b269cc))
-   support mssql@10 ([#&#8203;10356](https://github.com/typeorm/typeorm/issues/10356)) ([f6bb671](f6bb6711e2)), closes [#&#8203;10340](https://github.com/typeorm/typeorm/issues/10340)
-   use node-oracledb 6 ([#&#8203;10285](https://github.com/typeorm/typeorm/issues/10285)) ([3af891a](3af891a8e6)), closes [#&#8203;10277](https://github.com/typeorm/typeorm/issues/10277)
-   user-defined index name for STI discriminator column ([#&#8203;10509](https://github.com/typeorm/typeorm/issues/10509)) ([89c5257](89c525761d)), closes [#&#8203;10496](https://github.com/typeorm/typeorm/issues/10496)

##### Performance Improvements

-   improve SapQueryRunner performance ([#&#8203;10198](https://github.com/typeorm/typeorm/issues/10198)) ([f6b87e3](f6b87e3ee1))

##### BREAKING CHANGES

-   With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib
-   MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found.
    See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES\_6.0.0.md
-   [new nullable embeds feature](https://github.com/typeorm/typeorm/pull/10289) introduced a breaking change which might enforce you to update types on your entities to `  | null `,
    if all columns in your embed entity are nullable. Since database queries now return embedded property as `null` if all its column values are null.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/395
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-01-30 18:28:37 +00:00
RenovateBot 0a251b2691 Update dependency @types/node to v20.11.10 (#392)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | minor | [`20.10.5` -> `20.11.10`](https://renovatebot.com/diffs/npm/@types%2fnode/20.10.5/20.11.10) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/392
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-01-30 18:27:26 +00:00
Ethan Lane 07237b82aa v3.2.0
All checks were successful
continuous-integration/drone/push Build is passing
2024-01-29 17:53:43 +00:00
Ethan Lane 56f0d105be Create button event to gain the server access role (#398)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Add the ability for button event interactions to be created
- Added a button event interaction which gives a user the role which is specified in the config `verification.role`
- Added a command to generate a button to activate the verify button event

#232

## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/398
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-01-26 20:59:05 +00:00
RenovateBot f0ab3b9080 Update dependency np to v9 (#380)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [np](https://github.com/sindresorhus/np) | devDependencies | major | [`^8.0.4` -> `^9.0.0`](https://renovatebot.com/diffs/npm/np/8.0.4/9.2.0) |

---

### Release Notes

<details>
<summary>sindresorhus/np (np)</summary>

### [`v9.2.0`](https://github.com/sindresorhus/np/releases/tag/v9.2.0)

[Compare Source](https://github.com/sindresorhus/np/compare/v9.1.0...v9.2.0)

-   Fix yarn npm publish for scoped packages  [`8d3a984`](https://github.com/sindresorhus/np/commit/8d3a984)
-   Fix broken revert code after publish failure  [`819ed29`](https://github.com/sindresorhus/np/commit/819ed29)

### [`v9.1.0`](https://github.com/sindresorhus/np/releases/tag/v9.1.0)

[Compare Source](https://github.com/sindresorhus/np/compare/v9.0.0...v9.1.0)

-   Add Yarn Berry support ([#&#8203;723](https://github.com/sindresorhus/np/issues/723))  [`0d9522b`](https://github.com/sindresorhus/np/commit/0d9522b)

### [`v9.0.0`](https://github.com/sindresorhus/np/releases/tag/v9.0.0)

[Compare Source](https://github.com/sindresorhus/np/compare/v8.0.4...v9.0.0)

##### Breaking

-   Require Node.js 18 and npm 9  [`6c2e00e`](https://github.com/sindresorhus/np/commit/6c2e00e)

##### Improvements

-   Group unpublished files in folders ([#&#8203;716](https://github.com/sindresorhus/np/issues/716))  [`c31c2bc`](https://github.com/sindresorhus/np/commit/c31c2bc)
-   improve messages related to new files and dependencies ([#&#8203;702](https://github.com/sindresorhus/np/issues/702))  [`ad7b09e`](https://github.com/sindresorhus/np/commit/ad7b09e)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/380
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2024-01-22 17:25:55 +00:00
Ethan Lane 7c2870d28e Fix bug where a default config setting wouldn't show the key you were using (#388)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Fix bug where a default config setting wouldn't show the key you were using
- Fix bug where a config which doesn't exist wouldn't show the key you were using

#289

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

- This was tested by checking both a setting which is defaulted and not used, and both now show they key correctly

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/388
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-12-22 14:36:36 +00:00
RenovateBot 26e7c20389 Update dependency @types/node to v20.10.5 (#387)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | devDependencies | patch | [`20.10.4` -> `20.10.5`](https://renovatebot.com/diffs/npm/@types%2fnode/20.10.4/20.10.5) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/387
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2023-12-18 13:32:33 +00:00
RenovateBot 4eabb2fbde Update dependency @discordjs/rest to v2.2.0 (#375)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@discordjs/rest](https://discord.js.org) ([source](https://github.com/discordjs/discord.js)) | dependencies | minor | [`2.0.1` -> `2.2.0`](https://renovatebot.com/diffs/npm/@discordjs%2frest/2.0.1/2.2.0) |

---

### Release Notes

<details>
<summary>discordjs/discord.js (@&#8203;discordjs/rest)</summary>

### [`v2.2.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/rest/CHANGELOG.md#discordjsrest220---2023-11-17)

[Compare Source](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.1.0...@discordjs/rest@2.2.0)

#### Bug Fixes

-   Minify mainlib docs json ([#&#8203;9963](https://github.com/discordjs/discord.js/issues/9963)) ([4b88306](4b88306dcb))

#### Features

-   Present x-ratelimit-scope for 429s hit ([#&#8203;9973](https://github.com/discordjs/discord.js/issues/9973)) ([6df233d](6df233de14))

#### Typings

-   Use wrapper utilities ([#&#8203;9945](https://github.com/discordjs/discord.js/issues/9945)) ([4bc1dae](4bc1dae36f))

### [`v2.1.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/rest/CHANGELOG.md#discordjsrest210---2023-11-12)

[Compare Source](https://github.com/discordjs/discord.js/compare/@discordjs/rest@2.0.1...@discordjs/rest@2.1.0)

#### Bug Fixes

-   **REST:** Strip webhook tokens ([#&#8203;9723](https://github.com/discordjs/discord.js/issues/9723)) ([cf49f40](cf49f405b0))

#### Documentation

-   Fix "its" typo ([#&#8203;9825](https://github.com/discordjs/discord.js/issues/9825)) ([c50809e](c50809e206))
-   **create-discord-bot:** Support bun in create-discord-bot ([#&#8203;9798](https://github.com/discordjs/discord.js/issues/9798)) ([7157748](7157748fe3))

#### Features

-   Expose Retry-After and sublimit timeouts in RatelimitData ([#&#8203;9864](https://github.com/discordjs/discord.js/issues/9864)) ([81e7866](81e7866903))
-   **CDN:** Support emoji size ([#&#8203;9787](https://github.com/discordjs/discord.js/issues/9787)) ([778df45](778df45166))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/375
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2023-12-18 13:31:46 +00:00
RenovateBot 24146e9772 Update dependency @types/uuid to v9.0.7 (#371)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/uuid) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | dependencies | patch | [`9.0.6` -> `9.0.7`](https://renovatebot.com/diffs/npm/@types%2fuuid/9.0.6/9.0.7) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/371
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2023-12-18 13:29:24 +00:00
RenovateBot 9e01c1871d Update dependency jest to v29.7.0 (#357)
All checks were successful
continuous-integration/drone/push Build is passing
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [jest](https://jestjs.io/) ([source](https://github.com/jestjs/jest)) | dependencies | minor | [`29.5.0` -> `29.7.0`](https://renovatebot.com/diffs/npm/jest/29.5.0/29.7.0) |
| [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jest) ([source](https://github.com/DefinitelyTyped/DefinitelyTyped)) | dependencies | patch | [`29.5.1` -> `29.5.11`](https://renovatebot.com/diffs/npm/@types%2fjest/29.5.1/29.5.11) |

---

### Release Notes

<details>
<summary>jestjs/jest (jest)</summary>

### [`v29.7.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2970)

[Compare Source](https://github.com/jestjs/jest/compare/v29.6.4...v29.7.0)

##### Features

-   `[create-jest]` Add `npm init` / `yarn create` initialiser for Jest projects ([#&#8203;14465](https://github.com/jestjs/jest/pull/14453))
-   `[jest-validate]` Allow deprecation warnings for unknown options ([#&#8203;14499](https://github.com/jestjs/jest/pull/14499))

##### Fixes

-   `[jest-resolver]` Replace unmatched capture groups in `moduleNameMapper` with empty string instead of `undefined` ([#&#8203;14507](https://github.com/jestjs/jest/pull/14507))
-   `[jest-snapshot]` Allow for strings as well as template literals in inline snapshots ([#&#8203;14465](https://github.com/jestjs/jest/pull/14465))
-   `[@jest/test-sequencer]` Calculate test runtime if `perStats.duration` is missing ([#&#8203;14473](https://github.com/jestjs/jest/pull/14473))

##### Performance

-   `[@jest/create-cache-key-function]` Cache access of `NODE_ENV` and `BABEL_ENV` ([#&#8203;14455](https://github.com/jestjs/jest/pull/14455))

##### Chore & Maintenance

-   `[jest-cli]` Move internal config initialisation logic to the `create-jest` package ([#&#8203;14465](https://github.com/jestjs/jest/pull/14453))

### [`v29.6.4`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2964)

[Compare Source](https://github.com/jestjs/jest/compare/v29.6.3...v29.6.4)

##### Fixes

-   `[jest-core]` Fix typo in `scheduleAndRun` performance marker ([#&#8203;14434](https://github.com/jestjs/jest/pull/14434))
-   `[jest-environment-node]` Make sure `atob` and `btoa` are writeable in Node 20 ([#&#8203;14446](https://github.com/jestjs/jest/pull/14446))
-   `[jest-worker]` Additional error wrapper for `parentPort.postMessage` to fix unhandled `DataCloneError`. ([#&#8203;14437](https://github.com/jestjs/jest/pull/14437))

### [`v29.6.3`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2963)

[Compare Source](https://github.com/jestjs/jest/compare/v29.6.2...v29.6.3)

##### Fixes

-   `[expect, @&#8203;jest/expect-utils]` `ObjectContaining` support `sumbol` as key ([#&#8203;14414](https://github.com/jestjs/jest/pull/14414))
-   `[expect]` Remove `@types/node` from dependencies ([#&#8203;14385](https://github.com/jestjs/jest/pull/14385))
-   `[jest-core]` Use workers in watch mode by default to avoid crashes ([#&#8203;14059](https://github.com/facebook/jest/pull/14059) & [#&#8203;14085](https://github.com/facebook/jest/pull/14085)).
-   `[jest-reporters]` Update `istanbul-lib-instrument` dependency to v6. ([#&#8203;14401](https://github.com/jestjs/jest/pull/14401))
-   `[jest-mock]` Revert [#&#8203;13692](https://github.com/jestjs/jest/pull/13692) as it was a breaking change ([#&#8203;14429](https://github.com/jestjs/jest/pull/14429))
-   `[jest-mock]` Revert [#&#8203;13866](https://github.com/jestjs/jest/pull/13866) as it was a breaking change ([#&#8203;14429](https://github.com/jestjs/jest/pull/14429))
-   `[jest-mock]` Revert [#&#8203;13867](https://github.com/jestjs/jest/pull/13867) as it was a breaking change ([#&#8203;14429](https://github.com/jestjs/jest/pull/14429))
-   `[@jest/reporters]` Marks Reporter's hooks as optional ([#&#8203;14433](https://github.com/jestjs/jest/pull/14433))
-   `[jest-runtime]` Fix dynamic ESM import module bug when loaded module through `jest.isolateModulesAsync` ([#&#8203;14397](https://github.com/jestjs/jest/pull/14397))

##### Chore & Maintenance

-   `[jest-changed-files, jest-circus, jest-console, @&#8203;jest/core, @&#8203;jest/runtime, @&#8203;jest/transform]` Use `invariant` and `notEmpty` from `jest-util` rather than own internal ([#&#8203;14366](https://github.com/jestjs/jest/pull/14366))

### [`v29.6.2`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2962)

[Compare Source](https://github.com/jestjs/jest/compare/v29.6.1...v29.6.2)

##### Fixes

-   `[jest-circus]` Fix snapshot matchers in concurrent tests when nr of tests exceeds `maxConcurrency` ([#&#8203;14335](https://github.com/jestjs/jest/pull/14335))
-   `[@jest/core]` When running global setup and teardown, do not try to change the `message` property of the thrown error object when the `message` property is unwritable ([#&#8203;14113](https://github.com/jestjs/jest/pull/14113))
-   `[jest-snapshot]` Move `@types/prettier` from `dependencies` to `devDependencies` ([#&#8203;14328](https://github.com/jestjs/jest/pull/14328))
-   `[jest-snapshot]` Throw an explicit error if Prettier v3 is used ([#&#8203;14367](https://github.com/jestjs/jest/pull/14367))
-   `[jest-reporters]` Add "skipped" and "todo" symbols to Github Actions Reporter ([#&#8203;14309](https://github.com/jestjs/jest/pull/14309))

##### Chore & Maintenance

-   `[@jest/core]` Use `pluralize` from `jest-util` rather than own internal ([#&#8203;14322](https://github.com/jestjs/jest/pull/14322))

### [`v29.6.1`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2961)

[Compare Source](https://github.com/jestjs/jest/compare/v29.6.0...v29.6.1)

##### Fixes

-   `[jest-circus]` Revert [#&#8203;14110](https://github.com/jestjs/jest/pull/14110) as it was a breaking change ([#&#8203;14304](https://github.com/jestjs/jest/pull/14304))

### [`v29.6.0`](https://github.com/jestjs/jest/blob/HEAD/CHANGELOG.md#2960)

[Compare Source](https://github.com/jestjs/jest/compare/v29.5.0...v29.6.0)

##### Features

-   `[jest-circus, jest-snapshot]` Add support for snapshot matchers in concurrent tests ([#&#8203;14139](https://github.com/jestjs/jest/pull/14139))
-   `[jest-cli]` Include type definitions to generated config files ([#&#8203;14078](https://github.com/facebook/jest/pull/14078))
-   `[jest-snapshot]` Support arrays as property matchers ([#&#8203;14025](https://github.com/facebook/jest/pull/14025))
-   `[jest-core, jest-circus, jest-reporter, jest-runner]` Added support for reporting about start individual test cases using jest-circus ([#&#8203;14174](https://github.com/jestjs/jest/pull/14174))

##### Fixes

-   `[jest-circus]` Prevent false test failures caused by promise rejections handled asynchronously ([#&#8203;14110](https://github.com/jestjs/jest/pull/14110))
-   `[jest-config]` Handle frozen config object ([#&#8203;14054](https://github.com/facebook/jest/pull/14054))
-   `[jest-config]` Allow `coverageDirectory` and `collectCoverageFrom` in project config ([#&#8203;14180](https://github.com/jestjs/jest/pull/14180))
-   `[jest-core]` Always use workers in watch mode to avoid crashes ([#&#8203;14059](https://github.com/facebook/jest/pull/14059)).
-   `[jest-environment-jsdom, jest-environment-node]` Fix assignment of `customExportConditions` via `testEnvironmentOptions` when custom env subclass defines a default value ([#&#8203;13989](https://github.com/facebook/jest/pull/13989))
-   `[jest-matcher-utils]` Fix copying value of inherited getters ([#&#8203;14007](https://github.com/facebook/jest/pull/14007))
-   `[jest-mock]` Tweak typings to allow `jest.replaceProperty()` replace methods ([#&#8203;14008](https://github.com/facebook/jest/pull/14008))
-   `[jest-mock]` Improve user input validation and error messages of `spyOn` and `replaceProperty` methods ([#&#8203;14087](https://github.com/facebook/jest/pull/14087))
-   `[jest-runtime]` Bind `jest.isolateModulesAsync` to `this` ([#&#8203;14083](https://github.com/facebook/jest/pull/14083))
-   `[jest-runtime]` Forward `wrapperLength` to the `Script` constructor as `columnOffset` for accurate debugging ([#&#8203;14148](https://github.com/facebook/jest/pull/14148))
-   `[jest-runtime]` Guard `_isMockFunction` access with `in` ([#&#8203;14188](https://github.com/facebook/jest/pull/14188))
-   `[jest-snapshot]` Fix a potential bug when not using prettier and improve performance ([#&#8203;14036](https://github.com/facebook/jest/pull/14036))
-   `[@jest/transform]` Do not instrument `.json` modules ([#&#8203;14048](https://github.com/facebook/jest/pull/14048))
-   `[jest-worker]` Restart a shut down worker before sending it a task ([#&#8203;14015](https://github.com/facebook/jest/pull/14015))

##### Chore & Maintenance

-   `[*]` Update `semver` dependency to get vulnerability fix ([#&#8203;14262](https://github.com/jestjs/jest/pull/14262))
-   `[docs]` Updated documentation for the `--runTestsByPath` CLI command ([#&#8203;14004](https://github.com/facebook/jest/pull/14004))
-   `[docs]` Updated documentation regarding the synchronous fallback when asynchronous code transforms are unavailable ([#&#8203;14056](https://github.com/facebook/jest/pull/14056))
-   `[docs]` Update jest statistics of use and downloads in website Index.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/357
Reviewed-by: Vylpes <ethan@vylpes.com>
Co-authored-by: Renovate Bot <renovate@vylpes.com>
Co-committed-by: Renovate Bot <renovate@vylpes.com>
2023-12-18 13:28:35 +00:00
27 changed files with 1348 additions and 1173 deletions

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=3.2 DEV
BOT_VER=3.2.1
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=682942374040961060
@ -15,6 +15,8 @@ BOT_CLIENTID=682942374040961060
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1
DB_PORT=3101
DB_NAME=vylbot

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=3.2
BOT_VER=3.2.1
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=680083120896081954
@ -15,6 +15,8 @@ BOT_CLIENTID=680083120896081954
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1
DB_PORT=3121
DB_NAME=vylbot

View file

@ -7,7 +7,7 @@
# any secret values.
BOT_TOKEN=
BOT_VER=3.2 BETA
BOT_VER=3.2.1
BOT_AUTHOR=Vylpes
BOT_OWNERID=147392775707426816
BOT_CLIENTID=1016767908740857949
@ -15,6 +15,8 @@ BOT_CLIENTID=1016767908740857949
ABOUT_FUNDING=https://ko-fi.com/vylpes
ABOUT_REPO=https://gitea.vylpes.xyz/RabbitLabs/vylbot-app
CACHE_INTERVAL=1800000 # 30 minutes
DB_HOST=127.0.0.1
DB_PORT=3111
DB_NAME=vylbot

View file

@ -0,0 +1,2 @@
ALTER TABLE server
ADD LastCached datetime NOT NULL DEFAULT '2024-03-01 18:10:04';

View file

@ -1,6 +1,6 @@
{
"name": "vylbot-app",
"version": "3.1.3",
"version": "3.2.1",
"description": "A discord bot made for Vylpes' Den",
"main": "./dist/vylbot",
"typings": "./dist",
@ -11,6 +11,7 @@
"test": "echo true",
"db:up": "typeorm migration:run -d dist/database/dataSources/appDataSource.js",
"db:down": "typeorm migration:revert -d dist/database/dataSources/appDataSource.js",
"db:create": "typeorm migration:create ./src/database/migrations",
"release": "np --no-publish"
},
"repository": {
@ -38,14 +39,15 @@
"mysql": "^2.18.1",
"random-bunny": "^2.0.5",
"ts-jest": "^29.0.0",
"typeorm": "0.3.17"
"typeorm": "0.3.20"
},
"resolutions": {
"**/semver": "^7.5.2"
"**/semver": "^7.5.2",
"**/undici": "^5.28.3"
},
"devDependencies": {
"@types/node": "^20.0.0",
"np": "^8.0.4",
"np": "^9.0.0",
"typescript": "^5.0.0"
}
}

View file

@ -0,0 +1,42 @@
import { ButtonInteraction, CacheType } from "discord.js";
import { ButtonEvent } from "../type/buttonEvent";
import SettingsHelper from "../helpers/SettingsHelper";
export default class Verify extends ButtonEvent {
public override async execute(interaction: ButtonInteraction<CacheType>) {
if (!interaction.guildId || !interaction.guild) return;
const roleName = await SettingsHelper.GetSetting("verification.role", interaction.guildId);
if (!roleName) return;
const role = interaction.guild.roles.cache.find(x => x.name == roleName);
if (!role) {
await interaction.reply({
content: `Unable to find the role, ${roleName}`,
ephemeral: true,
});
return;
}
const member = interaction.guild.members.cache.find(x => x.id == interaction.user.id);
if (!member || !member.manageable) {
await interaction.reply({
content: "Unable to give role to user",
ephemeral: true,
});
return;
}
await member.roles.add(role);
await interaction.reply({
content: "Given role",
ephemeral: true,
});
}
}

View file

@ -9,10 +9,14 @@ import { Command } from "../type/command";
import { Events } from "./events";
import { Util } from "./util";
import AppDataSource from "../database/dataSources/appDataSource";
import ButtonEventItem from "../contracts/ButtonEventItem";
import { ButtonEvent } from "../type/buttonEvent";
import CacheHelper from "../helpers/CacheHelper";
export class CoreClient extends Client {
private static _commandItems: ICommandItem[];
private static _eventItems: IEventItem[];
private static _buttonEvents: ButtonEventItem[];
private _events: Events;
private _util: Util;
@ -25,12 +29,17 @@ export class CoreClient extends Client {
return this._eventItems;
}
public static get buttonEvents(): ButtonEventItem[] {
return this._buttonEvents;
}
constructor(intents: number[], partials: Partials[]) {
super({ intents: intents, partials: partials });
dotenv.config();
CoreClient._commandItems = [];
CoreClient._eventItems = [];
CoreClient._buttonEvents = [];
this._events = new Events();
this._util = new Util();
@ -51,6 +60,10 @@ export class CoreClient extends Client {
await super.login(process.env.BOT_TOKEN);
this.guilds.cache.forEach(async (guild) => {
await CacheHelper.UpdateServerCache(guild);
});
this._util.loadEvents(this, CoreClient._eventItems);
this._util.loadSlashCommands(this);
}
@ -73,4 +86,13 @@ export class CoreClient extends Client {
CoreClient._eventItems.push(item);
}
public static RegisterButtonEvent(buttonId: string, event: ButtonEvent) {
const item: ButtonEventItem = {
ButtonId: buttonId,
Event: event,
};
CoreClient._buttonEvents.push(item);
}
}

View file

@ -1,40 +1,18 @@
import { Interaction } from "discord.js";
import ICommandItem from "../contracts/ICommandItem";
import SettingsHelper from "../helpers/SettingsHelper";
import { CoreClient } from "./client";
import ChatInputCommand from "./interactionCreate/chatInputCommand";
import Button from "./interactionCreate/button";
export class Events {
public async onInteractionCreate(interaction: Interaction) {
if (!interaction.isChatInputCommand()) return;
if (!interaction.guildId) return;
const disabledCommandsString = await SettingsHelper.GetSetting("commands.disabled", interaction.guildId);
const disabledCommands = disabledCommandsString?.split(",");
const disabledCommandsMessage = await SettingsHelper.GetSetting("commands.disabled.message", interaction.guildId);
if (disabledCommands?.find(x => x == interaction.commandName)) {
await interaction.reply(disabledCommandsMessage || "This command is disabled.");
return;
if (interaction.isChatInputCommand()) {
ChatInputCommand.onChatInput(interaction);
}
const item = CoreClient.commandItems.find(x => x.Name == interaction.commandName && !x.ServerId);
const itemForServer = CoreClient.commandItems.find(x => x.Name == interaction.commandName && x.ServerId == interaction.guildId);
let itemToUse: ICommandItem;
if (!itemForServer) {
if (!item) {
await interaction.reply('Command not found');
return;
}
itemToUse = item;
} else {
itemToUse = itemForServer;
if (interaction.isButton()) {
Button.onButtonClicked(interaction);
}
itemToUse.Command.execute(interaction);
}
// Emit when bot is logged in and ready to use

View file

@ -0,0 +1,17 @@
import { ButtonInteraction } from "discord.js";
import { CoreClient } from "../client";
export default class Button {
public static async onButtonClicked(interaction: ButtonInteraction) {
if (!interaction.isButton) return;
const item = CoreClient.buttonEvents.find(x => x.ButtonId == interaction.customId.split(" ")[0]);
if (!item) {
await interaction.reply("Event not found.");
return;
}
item.Event.execute(interaction);
}
}

View file

@ -0,0 +1,27 @@
import { Interaction } from "discord.js";
import { CoreClient } from "../client";
import ICommandItem from "../../contracts/ICommandItem";
export default class ChatInputCommand {
public static async onChatInput(interaction: Interaction) {
if (!interaction.isChatInputCommand()) return;
const item = CoreClient.commandItems.find(x => x.Name == interaction.commandName && !x.ServerId);
const itemForServer = CoreClient.commandItems.find(x => x.Name == interaction.commandName && x.ServerId == interaction.guildId);
let itemToUse: ICommandItem;
if (!itemForServer) {
if (!item) {
await interaction.reply("Command not found.");
return;
}
itemToUse = item;
} else {
itemToUse = itemForServer;
}
itemToUse.Command.execute(interaction);
}
}

View file

@ -121,9 +121,9 @@ export default class Config extends Command {
var defaultValue = DefaultValues.GetValue(key.value.toString());
if (defaultValue) {
await interaction.reply(`\`${key}\`: \`${defaultValue}\` <DEFAULT>`);
await interaction.reply(`\`${key.value}\`: \`${defaultValue}\` <DEFAULT>`);
} else {
await interaction.reply(`\`${key}\`: <NONE>`);
await interaction.reply(`\`${key.value}\`: <NONE>`);
}
}
}

View file

@ -1,7 +1,8 @@
import { CommandInteraction, EmbedBuilder, PermissionsBitField, SlashCommandBuilder } from "discord.js";
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, CommandInteraction, EmbedBuilder, PermissionsBitField, SlashCommandBuilder } from "discord.js";
import { existsSync, readFileSync } from "fs";
import EmbedColours from "../constants/EmbedColours";
import { Command } from "../type/command";
import SettingsHelper from "../helpers/SettingsHelper";
interface IRules {
title?: string;
@ -14,13 +15,36 @@ export default class Rules extends Command {
constructor() {
super();
super.CommandBuilder = new SlashCommandBuilder()
.setName("rules")
.setDescription("Send the rules embeds for this server")
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator);
this.CommandBuilder = new SlashCommandBuilder()
.setName('rules')
.setDescription("Rules-related commands")
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator)
.addSubcommand(x =>
x
.setName('embeds')
.setDescription('Send the rules embeds for this server'))
.addSubcommand(x =>
x
.setName('access')
.setDescription('Send the server verification embed button'));
}
public override async execute(interaction: CommandInteraction) {
if (!interaction.isChatInputCommand()) return;
switch (interaction.options.getSubcommand()) {
case "embeds":
await this.SendEmbeds(interaction);
break;
case "access":
await this.SendAccessButton(interaction);
break;
default:
await interaction.reply("Subcommand doesn't exist.");
}
}
private async SendEmbeds(interaction: CommandInteraction) {
if (!interaction.guildId) return;
if (!existsSync(`${process.cwd()}/data/rules/${interaction.guildId}.json`)) {
@ -71,4 +95,27 @@ export default class Rules extends Command {
await interaction.reply({ embeds: [ successEmbed ], ephemeral: true });
}
private async SendAccessButton(interaction: CommandInteraction) {
if (!interaction.guildId) return;
const buttonLabel = await SettingsHelper.GetSetting("rules.access.label", interaction.guildId);
const row = new ActionRowBuilder<ButtonBuilder>()
.addComponents([
new ButtonBuilder()
.setCustomId('verify')
.setStyle(ButtonStyle.Primary)
.setLabel(buttonLabel || "Verify")
]);
await interaction.channel?.send({
components: [ row ]
});
await interaction.reply({
content: "Success",
ephemeral: true,
});
}
}

View file

@ -31,6 +31,7 @@ export default class DefaultValues {
// Rules (Command)
this.values.push({ Key: "rules.file", Value: "data/rules/rules" });
this.values.push({ Key: "rules.access.label", Value: "Verify" });
// Channels
this.values.push({ Key: "channels.logs.message", Value: "message-logs" });

View file

@ -0,0 +1,8 @@
import { ButtonEvent } from "../type/buttonEvent";
interface ButtonEventItem {
ButtonId: string,
Event: ButtonEvent,
}
export default ButtonEventItem;

View file

@ -1,4 +1,4 @@
import { Entity, OneToMany } from "typeorm";
import { Column, Entity, OneToMany } from "typeorm";
import BaseEntity from "../../contracts/BaseEntity";
import Role from "./Role";
import Setting from "./Setting";
@ -9,14 +9,22 @@ export default class Server extends BaseEntity {
super();
this.Id = serverId;
this.LastCached = new Date();
}
@Column({ default: "2024-03-01 18:10:04" })
LastCached: Date;
@OneToMany(() => Setting, x => x.Server)
Settings: Setting[];
@OneToMany(() => Role, x => x.Server)
Roles: Role[];
public UpdateLastCached(lastCached: Date) {
this.LastCached = lastCached;
}
public AddSettingToServer(setting: Setting) {
this.Settings.push(setting);
}

View file

@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from "typeorm"
import MigrationHelper from "../../../helpers/MigrationHelper"
export class AddServerCacheDate1709316734401 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
MigrationHelper.Up('1709316734401-AddServerCacheDate', '3.2.1', [
"01-Server",
], queryRunner);
}
public async down(queryRunner: QueryRunner): Promise<void> {
}
}

View file

@ -1,10 +1,13 @@
import { EmbedBuilder, GuildMember, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours";
import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberAdd(member: GuildMember) {
if (!member.guild) return;
await CacheHelper.UpdateServerCache(member.guild);
const enabled = await SettingsHelper.GetSetting("event.member.add.enabled", member.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -1,10 +1,13 @@
import { EmbedBuilder, GuildMember, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours";
import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberRemove(member: GuildMember) {
if (!member.guild) return;
await CacheHelper.UpdateServerCache(member.guild);
const enabled = await SettingsHelper.GetSetting("event.member.remove.enabled", member.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -1,8 +1,11 @@
import { GuildMember } from "discord.js";
import NicknameChanged from "./GuildMemberUpdate/NicknameChanged";
import CacheHelper from "../../helpers/CacheHelper";
export default async function GuildMemberUpdate(oldMember: GuildMember, newMember: GuildMember) {
if (oldMember.nickname != newMember.nickname) { // Nickname change
await CacheHelper.UpdateServerCache(newMember.guild);
if (oldMember.nickname !== newMember.nickname) { // Nickname change
await NicknameChanged(oldMember, newMember);
}
}

View file

@ -1,11 +1,14 @@
import { Message } from "discord.js";
import SettingsHelper from "../../helpers/SettingsHelper";
import VerificationCheck from "./MessageCreate/VerificationCheck";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageCreate(message: Message) {
if (!message.guild) return;
if (message.author.bot) return;
await CacheHelper.UpdateServerCache(message.guild);
const isVerificationEnabled = await SettingsHelper.GetSetting("verification.enabled", message.guild.id);
if (isVerificationEnabled && isVerificationEnabled.toLocaleLowerCase() == "true") {

View file

@ -2,11 +2,14 @@ import { EmbedBuilder, Message, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours";
import IgnoredChannel from "../../database/entities/IgnoredChannel";
import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageDelete(message: Message) {
if (!message.guild) return;
if (message.author.bot) return;
await CacheHelper.UpdateServerCache(message.guild);
const enabled = await SettingsHelper.GetSetting("event.message.delete.enabled", message.guild.id);
if (!enabled || enabled.toLowerCase() != "true") return;

View file

@ -2,10 +2,14 @@ import { EmbedBuilder, Message, TextChannel } from "discord.js";
import EmbedColours from "../../constants/EmbedColours";
import IgnoredChannel from "../../database/entities/IgnoredChannel";
import SettingsHelper from "../../helpers/SettingsHelper";
import CacheHelper from "../../helpers/CacheHelper";
export default async function MessageUpdate(oldMessage: Message, newMessage: Message) {
if (!newMessage.guild) return;
if (newMessage.author.bot) return;
await CacheHelper.UpdateServerCache(newMessage.guild);
if (oldMessage.content == newMessage.content) return;
const enabled = await SettingsHelper.GetSetting("event.message.update.enabled", newMessage.guild.id);

View file

@ -0,0 +1,27 @@
import { Guild } from "discord.js";
import Server from "../database/entities/Server";
export default class CacheHelper {
public static async UpdateServerCache(guild: Guild) {
const cacheInterval = process.env.CACHE_INTERVAL;
if (!cacheInterval) return;
let server = await Server.FetchOneById(Server, guild.id);
if (!server) {
server = new Server(guild.id);
await server.Save(Server, server);
await CacheHelper.UpdateCache(guild);
} else if (server.LastCached.getTime() + Number(cacheInterval) < Date.now()) {
await CacheHelper.UpdateCache(guild);
}
}
private static async UpdateCache(guild: Guild) {
console.log(`Updating cache for ${guild.name} (${guild.id})`);
await guild.members.fetch();
}
}

View file

@ -37,6 +37,9 @@ import MessageDelete from "./events/MessageEvents/MessageDelete";
import MessageUpdate from "./events/MessageEvents/MessageUpdate";
import MessageCreate from "./events/MessageEvents/MessageCreate";
// Button Event Imports
import Verify from "./buttonEvents/verify";
export default class Registry {
public static RegisterCommands() {
CoreClient.RegisterCommand("about", new About());
@ -84,4 +87,8 @@ export default class Registry {
CoreClient.RegisterEvent(EventType.MessageUpdate, MessageUpdate);
CoreClient.RegisterEvent(EventType.MessageCreate, MessageCreate);
}
public static RegisterButtonEvents() {
CoreClient.RegisterButtonEvent("verify", new Verify());
}
}

5
src/type/buttonEvent.ts Normal file
View file

@ -0,0 +1,5 @@
import { ButtonInteraction } from "discord.js";
export abstract class ButtonEvent {
abstract execute(interaction: ButtonInteraction): Promise<void>;
}

View file

@ -37,5 +37,6 @@ const client = new CoreClient([
registry.RegisterCommands();
registry.RegisterEvents();
registry.RegisterButtonEvents();
client.start();

2199
yarn.lock

File diff suppressed because it is too large Load diff