Commit Graph

5 Commits

Author SHA1 Message Date
Fleny
27c261fee2 formatter: Use semicolons (#4686)
I prefer semicolors, they also help avoiding certain pitfalls in JavaScript/TypeScript, such as the following code sample:
```js
const xyz = "test"
(something.else as string) = "another"
```
This results in a TypeError: "test" is not a function, this is because js thinks we are trying to call the string "test" as a function.
To fix this it requires a `;` somewhere before the `(`, such as `;(something ... ` which in my opinion is ugly and less clean overall.
2026-01-17 21:54:15 +01:00
Fleny
27ab08a61d feat(gateway)!: Resharding with workers (#4206)
* feat(gateway): Rework how shards are resharded

* Make bigbot example use the resharding

* fix reshard doesn't increment the lastShardId

From my testing it works, however i don't know if we should just do
this or is there a better way

* revert createGatewayManager type changes
It breaks if you want to disable resharding, didn't think of that

* Fix typo (#4252)

* Apply suggestions from code review

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

---------

Co-authored-by: NotDemonix <90858555+NotDemonix@users.noreply.github.com>
Co-authored-by: Link <lts20050703@gmail.com>
2025-08-04 19:46:24 +02:00
Fleny
5cb7c1d1d2 example(bigbot): Spawn one shard at a time (#4127)
* Spawn one shard at a time

* remove useless code in ShardIdentified handling

* update comment on tellWorkerToIdentify

* fix mistake

* Use request identify

This also makes some unrelated changes needed to make the example
comple when using the build from this branch.

* remove debug logs
2025-05-25 14:00:47 +05:30
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
Fleny
769d50ff93 feat(examples): Migrate example bots to discordeno v19 (#3647)
* Migrate beginner and minimal bot to discordeno v19

* Add .swcrc and fix minimal yarn.lock

* update .gitignore files

* Update nodejs template

Discordeno.js (DD v13) -> DD v19 "raw"

Currently the permission checking is not working correctly

* Fix permission issue

* Rename the templates

* remove unused indents

* Rename starter to beginner

So now it is minimal (main branch) -> beginner

* Really small refactor & eslint fixes (bigbot template)

This is to make my life less miserable at a later time

* mark rabbitMQ plugins as binary files

git seems to be treating them as text

* Add v19 bigbot rest

* Add gateway code

and rabbitmq_message_deduplication v0.6.2 plugin

* fix yarn messy semevr version for @types/amqplib

* clear channel con amqp connection close

* Add bot code for bigbot v19

missing prisma setup, collector setup & language setup

* Add localization

The "command versioning" system works the same say as before, but instead of a command version the code updates the commands every time they change based on the SHA1 of the commands

* Use file relative paths instead of cwd relative paths

* Fix todos

* revert autocomplete tests

* Revert "Add localization"

This reverts commit 2b1da8d2cd.

* move env assertion to config.ts

* Add shard ping to /ping

* fix small issue

* Update readme files

* use Date.now() for the bigbot REST ping

* Remove bigbot v16 code

* Add docker (compose) setup to bigbot template

* remove healthchecks from rest & gateway

* Update dependencies of examples

* Apply readme(s) suggestions from code review

Hopefully i haven't missed any related to markdown files

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

* Apply code suggestions from code review

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

---------

Co-authored-by: LTS20050703 <lts20050703@gmail.com>
2024-07-07 10:40:43 -05:00