Commit Graph

428 Commits

Author SHA1 Message Date
Fleny
bb6b8df2cf Add get sticker pack endpoint (#3844) 2024-08-10 19:36:29 -05:00
Fleny
895cc17106 Add voice state http endpoints (#3841) 2024-08-10 19:36:15 -05:00
dependabot[bot]
985801c834 build(deps-dev): bump @types/node from 20.14.11 to 22.1.0 (#3839)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.11 to 22.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-10 19:36:01 -05:00
dependabot[bot]
c4000094c8 build(deps-dev): bump @types/chai from 4.3.16 to 4.3.17 (#3836)
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.3.16 to 4.3.17.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

---
updated-dependencies:
- dependency-name: "@types/chai"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2024-08-10 19:35:35 -05:00
Fleny
62b3122e89 Add recurrence rule to scheduled event (#3834) 2024-08-10 19:34:55 -05:00
Fleny
ab2930ce34 Add attachments to CreateMessageOptions (#3830) 2024-08-07 01:21:49 -05:00
Fleny
304a61c786 Add the propriety if it has _ to the object (#3828) 2024-08-07 01:20:50 -05:00
dependabot[bot]
14b015870d build(deps-dev): bump @types/ws from 8.5.11 to 8.5.12 (#3818)
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.5.11 to 8.5.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-07 01:17:10 -05:00
Fleny
d6898f2b7b feat(gateway): Use the native WebSocket implementation when available (#3808)
* Use the native WebSocket implementation when available

* merge types.js import in shard

* Apply suggestions from code review

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

* Do not use the WebSocket global on Node

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-08-07 01:16:55 -05:00
dependabot[bot]
8dc6c3f650 build(deps): bump typescript from 5.5.3 to 5.5.4 (#3797)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-07 01:12:06 -05:00
dependabot[bot]
ce4eb2c28c build(deps-dev): bump c8 from 9.1.0 to 10.1.2 (#3783)
Bumps [c8](https://github.com/bcoe/c8) from 9.1.0 to 10.1.2.
- [Release notes](https://github.com/bcoe/c8/releases)
- [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bcoe/c8/compare/v9.1.0...v10.1.2)

---
updated-dependencies:
- dependency-name: c8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-07 01:11:50 -05:00
Fleny
746f0a99ac fix(discordeno)!: Fix some errors in DiscordenoConfig (#3824)
* Fix typo, remove RecursivePartial from DiscordenoConfig.desiredProperties.properties

* Fix properties typo

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-08-03 10:26:21 +05:30
Fleny
9e1ada64b8 fix(rest): Use a _ check instead of the manual one on the switch (#3825)
* Use a _ check instead of the manual one on the switch

* invert the check, as the current one is wrong

* move the check to before indexing the object

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-08-03 10:17:26 +05:30
Fleny
22a611761b Make token in rest and gateway for createBot optional (#3820) 2024-08-03 10:10:09 +05:30
dependabot[bot]
01437ebb50 build(deps-dev): bump @swc/core from 1.4.2 to 1.7.3 (#3811)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.4.2 to 1.7.3.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.4.2...v1.7.3)

---
updated-dependencies:
- dependency-name: "@swc/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30 23:40:19 -05:00
Fleny
791943a652 fix(rest): ignore snakelized properties in changeToDiscordFormat (#3795)
* fixes #3666

* Update packages/rest/src/manager.ts

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-07-30 23:38:15 -05:00
Fleny
e315ee6d95 fix(bot)!: Remove old unprovided params from event params (#3794)
* Remove oldMessage from messageUpdate params

* Remove oldPresence from presenceUpdate as well
2024-07-30 23:36:26 -05:00
Fleny
658acfb906 fix(gateway): Make heartbeat logging clearer (#3793)
* Make heartbeat logging clearer

* Update packages/gateway/src/Shard.ts

Co-authored-by: LTS20050703 <lts20050703@gmail.com>

---------

Co-authored-by: LTS20050703 <lts20050703@gmail.com>
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-07-30 23:36:03 -05:00
Fleny
ef4cc80c63 fix(bot,gateway): Fix (some) resharding bugs (#3792)
* Improve logging, keep shard collections separated

* revert to erroring in getSessionInfo. Fill the value in createBot

* removed useless if

* remove same number of shards check

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

* Update manager.ts

* revert shard.events.message assignment for the spread

* use new Collection instead of .clear() + for-of

* Use fixed formula and note in the comment the inaccuracy

* Apply suggestions from code review

Co-authored-by: Awesome Stickz <awesome@stickz.dev>

* Add a remark to shardsFullPercentage to let the user know of the inaccuracy

* Update comment and add a clearInterval

The clearInterval is not strictly needed, however it is better to ensure there is always one and only one internal running at a given point

* revert check for all shards online
It was bugged as gateway.resharding.shards gets populated overtime and not instantly

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-07-30 23:34:32 +05:30
Fleny
e0209cf7f5 Rename game activity type to playing (#3807) 2024-07-30 04:25:53 +05:30
Fleny
faaa8af48a clear offlineSendQueue after resolving all the promises (#3806)
Co-authored-by: Awesome Stickz <awesome@stickz.dev>
2024-07-30 04:15:21 +05:30
dependabot[bot]
6ac34863e7 build(deps-dev): bump @types/ws from 8.5.10 to 8.5.11 (#3781)
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.5.10 to 8.5.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

---
updated-dependencies:
- dependency-name: "@types/ws"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 00:32:23 -05:00
dependabot[bot]
84e145eb65 build(deps-dev): bump @types/node from 20.14.10 to 20.14.11 (#3780)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.10 to 20.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 00:30:16 -05:00
Fleny
8ad8b5d6e8 Add shebang (#3789) 2024-07-23 00:29:23 -05:00
Fleny
c7b44e5e30 feat(bot): Add desiredProperties to createBot (#3787)
* Add `desiredProperties` to createBot

* remove not used default
2024-07-23 00:29:11 -05:00
Fleny
0819d2be9b feat(bot,types): Type commandOptionsParser, remove any (#3786)
* Type commandOptionsParser, remove any

* fix ts errors
2024-07-23 00:28:36 -05:00
Fleny
402f1b3049 Add message forward (#3764) 2024-07-21 11:49:07 -05:00
dependabot[bot]
b61cabed05 build(deps-dev): bump chai-as-promised from 7.1.1 to 8.0.0 (#3762)
Bumps [chai-as-promised](https://github.com/chaijs/chai-as-promised) from 7.1.1 to 8.0.0.
- [Release notes](https://github.com/chaijs/chai-as-promised/releases)
- [Commits](https://github.com/chaijs/chai-as-promised/compare/v7.1.1...v8.0.0)

---
updated-dependencies:
- dependency-name: chai-as-promised
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-20 16:56:33 -05:00
dependabot[bot]
7c404ee420 build(deps-dev): bump mocha from 10.5.1 to 10.7.0 (#3778)
Bumps [mocha](https://github.com/mochajs/mocha) from 10.5.1 to 10.7.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.5.1...v10.7.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-20 16:56:21 -05:00
Fleny
2421ae24cf Add application emoji endpoints (#3774) 2024-07-20 16:56:00 -05:00
Fleny
c1fd19c0ee Remove DiscordPartialGuild, use Partial<DiscordGuild> (#3768) 2024-07-20 16:55:45 -05:00
Fleny
fb8af2ba54 Use passed in logger instead of the imported one (#3765) 2024-07-20 16:54:38 -05:00
Fleny
0a5493196d fix(rest): Fix followups from getting stuck in queue (#3761)
* Fix followups from getting stuck in queue

* remove queueIdentifier as it isn't actually needed

* Revert some changes that aren't needed
2024-07-20 16:53:41 -05:00
Fleny
235334381c Add roblox connection (#3757) 2024-07-20 16:53:20 -05:00
dependabot[bot]
4142946071 build(deps-dev): bump @biomejs/biome from 1.8.0 to 1.8.3 (#3748)
Bumps [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) from 1.8.0 to 1.8.3.
- [Release notes](https://github.com/biomejs/biome/releases)
- [Changelog](https://github.com/biomejs/biome/blob/main/CHANGELOG.md)
- [Commits](https://github.com/biomejs/biome/commits/cli/v1.8.3/packages/@biomejs/biome)

---
updated-dependencies:
- dependency-name: "@biomejs/biome"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-20 16:52:35 -05:00
Fleny
27fc12ec34 feat(cli)!: CLI generated types (#3453)
* Move transformers types to a single file

* Add script to test TS Compiler api capabilities
Remove nested objects where possible

* Use Partial<Role> and DiscordOverwrite instead of objects in AuditLogChange

* Fix typescript errors

* Remove interfaces.json

It is a generated file from the test script, not something that should be commited

* Start work on the test generation script
The TS version got bumped to 5.5.3

* Fix any type, use node16 module resolution

"node" is a deprecated alias for "node10", node16 is the recommended

Add code to check for type errors when getting the types from the interfaces

Fix errors when TS tries to find the files that the root tsconfig.json handles

* remove some useless compile options in TSApiTest

* Add jsdoc parsing
JSDoc tags with the next right after are not supported

* fix small format issue

* Fix ApplicationCommandPermissions todo

* Fix CI error

* Simplify parseDocumentation

* get type directly from the sourceFile

* remove hasUndefinedUnion as it is no longer used

* fix discordeno bin file name

* Update the yarn lockfile

* Merge scripts into one

* Use `@internal` instead of `@private` + `@deprecated`

* work on .d.ts files

* Process interface members once

* Move emit/preEmit diagnostics to a unit test

they can take quite a while, even 3-4 seconds, so running in the CLI every time does not seem ideal

* test: add build:types to test:unit dependencies

This is a test commit, it will provably get reversed. The scope is to see what CI does with this

* add find-up to deno import map

* add typescript to the deno import map

* Add node:assert to deno import map

* check for this.timeout that exists

deno does not have the timeout

* add build:type to deno-unit

* Temp hack to work-around the script deno tests

* Test with bun running the test as well

* fix turbo deps for unit tests

* remove test scripts

* Update CI to use build:type cache

* Apply code review suggestion

Co-authored-by: LTS20050703 <lts20050703@gmail.com>

* Add code to modify the interface member

* use an actual config

The config source is still a dummy object for now

* Search and use discordeno.config.js file

* provide config from cli options

* Handle props in base objects
The dependencies of an object need to be declared/updated manually, it would be painful to fix this in such a way that would be something that Typescript can give us from the compiler API

* add some tests for desired proprieties

* also check for a .mjs config file

* Add support for .ts config files

We use the typescript compiler to emit an in-memory version of the config file, import it and then remove it. It does not do bundling so if the config imports local files it will not work. Also the file is not type-checked as it would slow down the config loading

* remove compiler host, use callback on program.emit

* fix deno ci error

* add node:fs/promises to deno import map

---------

Co-authored-by: LTS20050703 <lts20050703@gmail.com>
2024-07-20 16:52:21 -05:00
Fleny
9e101a0320 fix: adapt biome formatting of package.json files to match the yarn one (#3745)
* Fix biome formatting of package.json files to match the yarn one

* Ignore package.json

This includes a format on the member toggles as that pr got merged while using ESLint formatting and it didn't get updated before merging
2024-07-14 12:59:19 -05:00
Fleny
87f62d2a4b fix(bot,types): guild members flags (#3617)
* Add flags field to ModifyGuildMember

Also add the GuildMemberFlags enum as that was missing

* Add flags to member object

* Fix type error

* Update member transformer

* Readd flags desired propriety

* Rename enum to MemberFlag for consitency

* Rename to GuildMemberFlags, use number not the enum itself

* Use ToggleBitfield for flags

* Add getters

* Fix build error

* Merge flags in toggles

* change flags getter to return the actual flags

And not our custom toggles values

* Fix reverse transformer
2024-07-13 13:12:02 -05:00
Fleny
ab6f632ca9 Update ModifyChannel interface (#3744) 2024-07-13 13:07:42 -05:00
Fleny
919474069d chore: Migrate ESLint and prettier to Biome (#3634)
* Migrate eslint and prettier to biomejs

This does NOT include examples/bigbot as it has its own formatter

* Update to biome 1.8.0

* Readd dotenv dev dependency to rest

During a merge it got lost
2024-07-13 13:05:02 -05:00
dependabot[bot]
af6ffc356d build(deps): bump commander from 12.0.0 to 12.1.0 (#3731)
Bumps [commander](https://github.com/tj/commander.js) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/tj/commander.js/releases)
- [Changelog](https://github.com/tj/commander.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tj/commander.js/compare/v12.0.0...v12.1.0)

---
updated-dependencies:
- dependency-name: commander
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 08:52:56 -05:00
dependabot[bot]
14d5e2ffb1 build(deps-dev): bump @swc/cli from 0.3.9 to 0.4.0 (#3729)
Bumps [@swc/cli](https://github.com/swc-project/pkgs) from 0.3.9 to 0.4.0.
- [Commits](https://github.com/swc-project/pkgs/commits)

---
updated-dependencies:
- dependency-name: "@swc/cli"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 08:52:46 -05:00
dependabot[bot]
f9bdfce589 build(deps-dev): bump eslint-plugin-n from 16.6.2 to 17.9.0 (#3727)
Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 16.6.2 to 17.9.0.
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/16.6.2...v17.9.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-n
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 08:52:35 -05:00
Fleny
7836ec393f Add missing proprieties on channel (#3736) 2024-07-13 08:52:05 -05:00
dependabot[bot]
e30e5a2a6b build(deps-dev): bump prettier from 3.2.5 to 3.3.3 (#3743)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.3.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 08:50:33 -05:00
dependabot[bot]
d1a91b9182 build(deps-dev): bump @typescript-eslint/parser from 7.15.0 to 7.16.0 (#3739)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.15.0 to 7.16.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.16.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-13 08:50:14 -05:00
Fleny
c7e0ccc87c always log close.code in debug, log close.code in info log (#3740) 2024-07-13 08:49:53 -05:00
Fleny
727c7104ed Rename channel.autoArchiveDuration to defaultAutoArchiveDuration (#3741) 2024-07-13 08:19:26 -05:00
Fleny
06664ed8bb fix(website): fix typedoc configuration (#3733)
* Fix typedoc CI crashse

And adapt the website to its new output

* Revert /tsconfig.json changes

* Update footer
2024-07-13 08:15:19 -05:00
dependabot[bot]
6762bd4476 build(deps-dev): bump sinon from 17.0.1 to 18.0.0 (#3721)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.1 to 18.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.1...v18.0.0)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-09 19:11:09 -05:00