Commit Graph

5052 Commits

Author SHA1 Message Date
Skillz4Killz
25ad834cac fix: contribution guide 2023-10-28 16:21:35 +00:00
Skillz4Killz
3e64b22874 update guild count values of bots using dd 2023-10-28 14:51:26 +00:00
Skillz4Killz
9df1252eb4 perma cactus logo 2023-10-28 14:45:07 +00:00
Skillz4Killz
0b93eed6bd Merge branch 'main' of https://github.com/discordeno/discordeno 2023-10-28 13:32:28 +00:00
Skillz4Killz
ea9dc10589 craete bot prop 2023-10-28 13:28:35 +00:00
Skillz4Killz
59631f2fac format 2023-10-28 13:25:09 +00:00
Skillz4Killz
ea9fca102a fix: add option to enable all desire props 2023-10-28 13:25:02 +00:00
Skillz4Killz
914dc30396 test: bun test (#2798)
* test: bun test

* Update package.json

* ci: update bun version

* Update package.json

* Update package.json

* test

* ci: update bun

* chore(ci): update bun version

---------

Co-authored-by: H01001000 <heiheiho000@gmail.com>
2023-10-28 12:52:58 +00:00
dependabot[bot]
1bd75d5914 build(deps): bump @babel/traverse from 7.21.4 to 7.23.2 in /website (#3156)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.21.4 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

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>
2023-10-28 12:52:08 +00:00
Fleny
eb6dd978ed fix LeakyBucket to handle refills, queue process (#3159) 2023-10-28 12:51:06 +00:00
Jonathan Ho
8f2daff769 feat(ci): add cache for deno (#3158)
* feat(ci): add cache for deno

* refactor(ci): per package cache
2023-10-28 12:50:19 +00:00
Skillz4Killz
eec2927285 fix: start a code philosophy section 2023-10-19 00:38:29 +00:00
Fleny
c0615a2983 refactor(gateway)!: Remove guildMemberChunk shard event (#3151)
* Remove guildMemberChunk shard event

* use DiscordMemberWithUser for requestMembers
2023-10-18 22:21:46 +00:00
Fleny
895b482a02 Add option for the header of auth on rest proxy (#3153) 2023-10-18 22:21:22 +00:00
Fleny
f98bb9bf75 fix(rest)!: Update OAuth2 to use the Basic authentication (#3150)
* update exchangeToken and revokeToken to use header

* update helpers file for the new signature
2023-10-15 04:32:04 +00:00
Fleny
a8f9e5ec1b feat: allow for custom function to send the payload to shards (#3149)
* Initial work for sendPayload

* fix docs comment
2023-10-15 04:30:58 +00:00
Awesome Stickz
4a38f1a6e4 refactor: ignore handlers if events for an handler isnt provided (#3148)
* refactor: ignore handlers if events for an handler isnt provided

* style: use !event instead of event === undefined check

* fix: handleGuildDelete check
2023-10-15 04:27:55 +00:00
dependabot[bot]
dc78446a59 build(deps): bump postcss from 8.4.21 to 8.4.31 in /website (#3147)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.21...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-15 04:26:40 +00:00
Jonathan Ho
6a55a6ff6f feat(cli): add cli (#3037)
* feat(bot): add cli

* refactor: move to discordeno package

* refactor(cli): blank state
2023-10-15 04:25:08 +00:00
Fleny
730ad9a3dc Add interactionDataOptions customizer (#3146) 2023-10-06 03:54:48 +00:00
Matthew Hatcher
9f5e3ab9ff feat(utils): add embed builder (#3145)
* feat: add embed builder

* feat: account for if a parsed color is NaN

* feat: add code doc

* feat: add example to JSDoc

* feat: add ability to override the current embed index

* style: remove extra whitespace

* feat: add validate method logic

* feat: finish remaining todo

* fix: account for length value in the setCurrentEmbed call

* feat: removing custom error and throw generic

* feat: add initial tests

* feat: add builder object with embeds function

* feat: changing to a method instead of object

* feat: add more tests

* style: lint
2023-10-06 03:54:11 +00:00
Fleny
832df1697a feat: add support for more customizers (#3139)
* feat: add support for customizers

* Fixing typescript build errors

* add customers for transformGatewayBot

and transformThreadMemberGuildCreate customizers and transformer
2023-10-01 17:03:08 +00:00
Skillz4Killz
6e8f15557c Pr/livelove1987/3138 (#3143)
* feat: Adding invite helper use transformer

* fix: Fix type error

* Update packages/bot/src/transformers/invite.ts

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>

* fixes

* fix: Fixed invite transformer

* Remove < > in comment

* Fix: remove useless const

* fix invite

* fix: ts error

---------

Co-authored-by: livelove1987 <mateusz.luboinski@gmail.com>
Co-authored-by: livelove1987 <82705913+livelove1987@users.noreply.github.com>
2023-09-30 14:58:14 -05:00
Fleny
15a7899a28 Add default_values support for SelectMenu (#3144) 2023-09-30 19:50:10 +00:00
Awesome Stickz
45c878d390 fix(bot): bug with overriding lastShardId if it's not provided in createBot() options (#3141)
* fix(gateway): bug with overriding lastShardId if it's not provided in createBot() options

* fix the fix
2023-09-30 14:14:05 +00:00
dependabot[bot]
6572238ce8 build(deps): bump get-func-name from 2.0.0 to 2.0.2 (#3142)
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 14:13:12 +00:00
8au
c6414d60dc docs: Updated the guide for making custom bot REST instances to use the new createBaseHeaders() function (#3136)
* docs: Updated the guide for making custom bot REST instances to use the new createBaseHeaders() function

* Update website/docs/bigbot/step-2-rest.md

* Update website/docs/bigbot/step-2-rest.md

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-09-21 15:53:44 +00:00
Fleny
42873982a2 Use desiredProperties in transformAttachment (#3134)
* Use desiredProperties in transformAttachment

* remove not necessary payload checks

* add checks for payload
2023-09-21 14:05:28 +00:00
Fleny
b1a47394a3 Use desiredProperties in transformEmoji (#3133)
* Use desiredProperties in transformEmoji

* remove not necessary payload checks

* add checks for payload
2023-09-21 14:05:11 +00:00
Fleny
39a4c07fac Use desiredProperties in transformScheduledEvent (#3132)
* use desiredProperties in transformScheduledEvent

* add checks for payload
2023-09-21 14:04:51 +00:00
Fleny
59c320beaa Use desiredProperties in transformStageInstance (#3131)
* Use desiredProperties in transformStageInstance

* add checks for payload
2023-09-21 14:04:32 +00:00
Fleny
1341fe0581 Use desiredProperties in transformSticker (#3130)
* Use desiredProperties in transformSticker

* add checks for payload
2023-09-21 14:04:16 +00:00
Fleny
a5d23b4924 Use desiredProperties in transformWebhook (#3129)
* Use desiredProperties in transformWebhook

* add checks for payload
2023-09-21 14:03:49 +00:00
Fleny
cb4f097510 Use desiredProperties in transformGuild (#3128)
* Use desiredProperties in transformGuild

* join channels and threads, make threads a getter

* remove not necessary payload checks

* readd the payload checks, add missing ones

This reverts commit b12e3f09cb.
2023-09-21 14:02:43 +00:00
Fleny
d75a3facc5 Use desiredProperties in transformInvite (#3127)
* Use desiredProperties in transformInvite

* remove not necessary payload checks

* add checks for payload
2023-09-21 13:52:39 +00:00
Sam Teeuwisse
1355d54035 Fix commandOptionsParser and move to bot package (#3135) 2023-09-20 14:04:41 +00:00
ITOH
bccbc73f77 fix(gateway): workerId calculation (#3126) 2023-09-19 20:22:52 +00:00
8au
f3a568c4db feat: rest header injection (#3122)
* feat: made some progress on a function which can be overridden to allow users to inject custom headers into a rest request

* made the changes suggested in PR. Renamed inject headers to createBaseHeaders, which adds the user agent into the headers.
2023-09-19 20:14:32 +00:00
Awesome Stickz
f34c0c3bc0 fix: bug with rest manager passing a timestamp instead of milliseconds in setTimeout (#3125) 2023-09-19 17:09:48 +00:00
Sam Teeuwisse
940ef8dc39 fix(utils): Add missing export for interactions.ts (#3123) 2023-09-19 16:25:36 +00:00
Fleny
a7d645ec4b feat: Implement OAuth2 endpoints (#3114)
* add OAuth2 routes

* Add oauth2 methods to rest

* Add rest manager methods, Add token params

* Add authorization headers

* Add auth to editUserApplicationRoleConnection

* fix logging header always displaying bot as auth

* Add OAuth2Scope enum

* Start testing ratelimit handling

* Fix now scopes are separated by a space

* move webhook object to DiscordAccessTokenResponse

* convert payload to snake_case

* fix some typings

* more types fixes

* add support for upserting commands with tokens

* handle correctly ratelimit and concurrently

* add guild to DiscordAccessTokenResponse

* Add oauth2 create link function

* Fix removeTokenPrefix to support Bearer tokens

* update jsdoc comment for removeTokenPrefix

* fix removeTokenPrefix unit tests

* fix see link on getMember and getCurrentMember

* add bot helpers and fix some types

* Use objects to pass the bearer tokens

* fix Deno issue with Buffer.from

* Merge 'upstream/main' into feat/oauth2 to fix merge conflict

* Fix debug queue logging

* keep only 1 route for current user

* add Bearer prefixed url to the rest of the logs

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-09-19 16:23:22 +00:00
Skillz
c92649029b Merge branch 'main' of https://github.com/discordeno/discordeno into main 2023-09-14 09:44:16 -05:00
Skillz
4d2bb53361 fix: tiny bug in guide 2023-09-14 09:44:04 -05:00
Fleny
a087a52d6f Fix(rest) Fix error when serializing payload with a BigInt (#3117)
* Fix error when serializing payload with bigint

* add comment for reason of changeToDiscordFormat
2023-09-08 14:48:47 +00:00
Matthew Hatcher
e69d39ce6a fix(types): change communicationDisabledUntil to string or null (#3120)
* fix(types): change communicationDisabledUntil to string or null

* Update packages/types/src/discordeno.ts

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-09-08 14:47:50 +00:00
livelove1987
ceb3d4dbe2 Fix: added getActiveThreads return value transformer (#3118) 2023-09-02 15:53:06 +00:00
livelove1987
cd29c5f0b1 fix(bot): properly handle thread list sync event (#3116)
* fix: Added threadListSync event support

* fix: Added threadListSync event support

* Update packages/bot/src/bot.ts

---------

Co-authored-by: ITOH <to@itoh.at>
2023-08-28 21:47:30 +00:00
Fleny
1e8edb99c6 bug(rest) Invert unauthorized check (#3104) 2023-08-24 17:21:17 +00:00
Skillz
a89107b5c4 fix: remove testing skillz name 2023-08-23 13:08:22 -05:00
Skillz
a6e99f3048 fix: remove discrims and support multiple devs 2023-08-23 13:06:19 -05:00