Commit Graph

48 Commits

Author SHA1 Message Date
ITOH
03996c5f58 refactor: revert "feat: base plugin lib idea (#2308)" (#2336)
* Revert "feat: base plugin lib idea (#2308)"

This reverts commit ffe7cdbc6f.

* fmt
2022-07-02 14:24:43 +01:00
Skillz4Killz
ffe7cdbc6f feat: base plugin lib idea (#2308)
* feat: base plugin lib idea

* fix: stuff

* fmt

* fix: imports and exports

* fix: errors & tests

* fix: remove logs
2022-06-18 18:46:37 -04:00
Skillz4Killz
aa2e5131ef fix: test local queue idea (#2301)
* fix: test local queue idea

* I HATE STUPIDEST DENO FMT

* try new error

* fix: url

* fix: with proper headers

* fix: cleanup
2022-06-17 13:01:26 -04:00
Jonathan Ho
dc1ca7c005 feat: reverse transformers (#2305)
* feat: reverse transformer

* fix: cap

* deno fmt

* refactor: change to use toggles list

* Revert "refactor: change to use toggles list"

This reverts commit 31f170f31b.

* fix: forget reverse transformer
2022-06-17 11:38:18 -04:00
Skillz4Killz
decb2e23c0 BREAKING(constantts): move routes to separate file 2022-06-15 17:31:49 +00:00
Skillz4Killz
a8da4571cd Merge branch 'main' of https://github.com/discordeno/discordeno into main 2022-06-15 15:34:02 +00:00
Skillz4Killz
2b0213c425 BREAKING(rest): move RestManager to restManager file 2022-06-15 15:34:00 +00:00
Skillz4Killz
ccd8506c81 Auto mod blame wolf (#2267)
* feat(meister): add automod

* fix(test); rest error with code

* fix(rest): log error nicely

* fix(test): disable benchmark test until gateway rewrite

* fix(automod): enum should start with 1

* fix(helper): better undefined handling of metadata

* fix(transfomrers): automod transformers

* fix(tests): add some automod tests

* Update types/shared.ts

Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com>

* fix: changes discord made recently

* fix(fmt): i hate deno fmt but i love itoh

Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com>
Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-06-15 11:25:53 -04:00
Nicholas Sylke
bbbd30d7a5 typings: change any to unknown (#2285)
* typings: change any/unknown to void

* typings: use unknown instead of void
2022-06-15 09:43:29 -04:00
ITOH
c7eb3a9b0c hotfix: release: 13.0.0-rc45
Fixed:
 - startBot shard data calculation
 - propper handling for websocket close code 1000

Changed:
 - shard shutdown code to 3000
2022-05-29 18:22:56 +02:00
ITOH
d50be0834e fix(gateway,bot): socket close debug handling & last/totalShards (#2261) 2022-05-29 17:39:27 +02:00
Skillz4Killz
28974f2497 fix(utils): remove hasProperty. Unused function 2022-05-28 13:28:11 +00:00
ITOH
24f7718566 feat!: make createBot sync (#2255) 2022-05-27 23:50:39 +02:00
ITOH
c4ba54e4ee fix(bot): pass intents to gatewayConfig (#2253) 2022-05-25 23:05:05 +02:00
ITOH
b469c98527 refactor(gateway,types,util)!: finalize gateway code (#2241)
* push some cursed stuff

* bucket

* fix bugs and hack start ordered

* some management improvements

* more gw stuff

* f

* rename manager to gateway

* remove basic thing

* remove old stuff

* f

* fix imp

* fixes
2022-05-25 22:27:49 +02:00
ITOH
1edb3c2110 refactor(bot,plugins/helpers,rest,util)!: improve rest route handling (#2248)
* refactor(bot,helpers,plugins,rest,util)!: improve rest route handling
 - rename endpoints constant to routes
 - simplify routes code by removing bases and function calls
 - url query params can now be passed to the route functions

* style: deno fmt

* fix base stuff

* suggestions
2022-05-25 20:35:25 +02:00
ITOH
d7883855ec refactor(.github,README,gateway,plugins/fileloader,tests,types)!: make intent calculation manual
This changes the calculation of intents to be manual to the dev.
This is to improve overall consistency of our code base, also it is not a big drawback for users since intents are usually done once and then never (seldom) touched again.
2022-05-24 23:16:01 +02:00
Skillz4Killz
bc2a7ade24 fix: bot id optional on createBot 2022-05-18 16:57:50 +00:00
Skillz4Killz
4c67ea3482 fix: make intents and events optional 2022-05-18 16:34:31 +00:00
LTS20050703
e4c8cde142 add guild widget settings interface, transformer (#2197)
* add guild widget settings interface, transformer

* fix bot.transformers.widgetSettings is not a function

Co-authored-by: ITOH <to@itoh.at>
2022-05-13 08:51:58 -04:00
Skillz4Killz
8cb912730b feat: remove token prefix util (#2191)
* feat: remove token prefix util

* fix: token substring

* fix: speed up unit tests
2022-05-08 11:34:33 -04:00
ITOH
9980856eef refactor!: fix some spelling mistakes (#2144)
* refactor!: fix some spelling mistakes
This fixes some spelling mistakes around the code base. Note not all are fixed.

* subComponent
2022-03-31 14:16:34 +02:00
Skillz4Killz
bcaa43ab7d fix: lastShardId on startBot 2022-03-31 01:28:03 +00:00
ITOH
34a358f8bf feat(helpers,types)!: slash command localization (#2129)
* feat(helpers,types): slash command localization
Discord has documented the slash command localization feature now.
This adds the full functionality for those to Discordeno.

Additionally a `Locales` has also been added to allow for better typing.

Reference: https://github.com/discord/discord-api-docs/pull/4653

* suggestion

* better locales type

* f

* fix serializing

* stupid direct pushes

* b
2022-03-27 11:02:27 -04:00
Skillz4Killz
67ae26daf4 fix: reverse transformers missing 2022-03-25 19:29:20 +00:00
Skillz4Killz
0ec7fac393 fix: fmt 2022-03-25 14:13:45 +00:00
Skillz4Killz
9d9a142bca fix: missing transformer sorry tri 2022-03-25 13:00:16 +00:00
Skillz4Killz
9a539ba17f Merge branch 'main' of https://github.com/discordeno/discordeno into main 2022-03-25 10:38:17 +00:00
Skillz4Killz
92c281529d fix: sendWebhook components 2022-03-25 10:38:12 +00:00
ITOH
2c2ccb252c feat(helpers,types)!: add guild template transformer (#2132)
* feat(helpers,types)!: add guild template transformer
This adds a template transformer. Also this fixes incorrect type definitions regarding templates.

Breaking Change: The previously called `Template` interface which was used for creating templates has been renamed to `CreateTemplate`

* fmt

* forgot to add this

* use data
2022-03-25 06:15:17 -04:00
Skillz4Killz
de42065665 fix: thread member update event 2022-03-22 22:48:03 +00:00
LTS20050703
086258d1ea fix mod.ts export (#2121)
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-03-22 11:28:33 -04:00
Skillz4Killz
4787a430b7 fix: interaction data option transformer 2022-03-22 10:17:41 +00:00
Skillz4Killz
fe42864b00 fix: add nitroStickerPacks helper. Closes #2095 2022-03-21 12:08:43 +00:00
LTS20050703
3073c6d575 convert typeof to () => (#2116) 2022-03-20 09:13:11 -04:00
Skillz4Killz
e8f3946e72 fix: add user to reaction event 2022-03-20 12:04:09 +00:00
Skillz4Killz
554b92b2ff fix: any remaining type errors 2022-03-20 09:15:22 +00:00
Skillz4Killz
fc0a1da546 fix: fmt 2022-03-16 04:32:09 +00:00
Skillz4Killz
c4a36f0ca6 fix: add msg back to delete for lts 2022-03-16 03:14:21 +00:00
Skillz4Killz
8e2e6830f9 fix: bulk delete separated sorry lts thx giveaway 2022-03-16 03:03:00 +00:00
Skillz4Killz
a0a1554756 refactor: typings using ReturnType (#2105)
* fix: check new types idea

* fix: type errors

* fix: new style

* fix: more cleanup

* fix: more cleanup

* fix: cleanup audit logs

* fix: cleanup stickers

* fix: cleanup integrations

* fix: more cleanup

* fix: organize into 1 place

* fix: few errors

* fix: some broken import fixes

* fix: quite a lot of fixes across the board

* fix: more fixes for broken imports

* fix: more fixes for broken imports

* fix: handler imports

* fix: all remaining import errors

* fix: more errors needing fixes

* fix: clearing up transformers

* fix: few moer types

* fix: more cleanup of extra types

* fix: fmt

* fix: cleanup discordeno file

* Nuke Base Types (#2102)

* fix: cleanup snake stuff

* convert camelCase to snake_case (#2103)

* fix: add camelize

* fix: finalize remaining errors

* fix: imports in test

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-03-14 22:11:22 -04:00
Andreas Fink
ad8a9920ac feat(gateway): add stopGateway function (#2078)
* Move the shard stopping to gatewayManager in order to stop the gateway standalone.

* Update gateway/gateway_manager.ts

Co-authored-by: ITOH <to@itoh.at>

* Update gateway/stopGateway.ts

Co-authored-by: ITOH <to@itoh.at>

* Update gateway/stopGateway.ts

* Update gateway/stopGateway.ts

* Update gateway/stopGateway.ts

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-02-28 13:41:15 -05:00
Skillz4Killz
8654b4e87b fix: fmt 2022-02-25 15:07:08 +00:00
Skillz4Killz
0afd928650 fix: resharder bugs from testing gamer 2022-02-21 05:17:08 +00:00
ITOH
cfbfb67c8e refactor!: rename the ws folder to gateway (#2037) 2022-02-11 05:21:10 -05:00
Skillz4Killz
8aaea9f339 refactor!: move dirs outside of src/ (#2032) 2022-02-11 09:49:53 +00:00
ITOH
89e1e49709 god im dumb 2021-04-13 11:04:20 +02:00
ITOH
cc327a9f26 fix(eventHandlers): Wrong channel types 2021-04-13 11:04:01 +02:00