Commit Graph

5023 Commits

Author SHA1 Message Date
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
Skillz
b2f65c2acc fix: chunk resolve bug 2023-08-20 11:50:19 -05:00
Skillz
1c8442eb39 fix: broken nonce on large guild ids Closes #3066 2023-08-20 11:24:38 -05:00
Skillz
db8c464081 fix: docs update Closes #3054 2023-08-20 11:16:17 -05:00
Skillz
63156f3f49 Merge branch 'main' of https://github.com/discordeno/discordeno into main 2023-08-20 11:10:14 -05:00
Skillz
15fd5d123c fix: applicationId supports strings. Closes #3038 2023-08-20 11:09:40 -05:00
Awesome Stickz
db2c4001b2 fix: remove slash command test for now to fix tests (#3102) 2023-08-19 15:21:04 +00:00
Awesome Stickz
6e231b5276 feat: add message_author_id to Message Reaction Add event (#3101) 2023-08-19 14:59:11 +00:00
Endy
2d0f76ec5c fix(bot): channel transformer bitrate prop (#3100) 2023-08-08 16:38:23 +00:00
Fleny
6bcb529f9a Bug(utils) Fix bucket refill after the first time (#3097)
* bug(bucket) Fix LeakyBucket refill

* Fix formating
2023-08-08 16:37:41 +00:00
Awesome Stickz
0aeadbb275 fix(rest): bug with trying to pass string values in calculateBits() if object is already in Discord format in changeToDiscordFormat() (#3099) 2023-08-05 18:32:10 +00:00
Fleny
e70a1788f5 Bug(gateway) Fix fetch of discord gateway session information (#3098)
* bug(gateway) Remove update createBot options

Add overrides when fetching discord session info

* Use createBot options instead of defaults
2023-08-05 18:31:35 +00:00
Endy
a911519ed0 fix(gateway): update deno detection (#3092) 2023-08-05 18:27:25 +00:00
NeKz
1424e5552b fix(bot): Transform hashes correctly (#3091) 2023-08-05 18:26:16 +00:00
Wifus
9927c5bb3d Update website URL in examples' README.md (#3063)
* Update website URL in examples' README.md

* Update examples/README.md

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-08-05 18:25:07 +00:00
Awesome Stickz
3445211091 fix(docs): set ListGuildMembers options.limit default to 1 (#3065) 2023-07-23 21:00:27 +00:00
Yaikava
ec5e800bcd 🐛 - fix: snakelize json when files are used (#3062) 2023-07-23 20:59:59 +00:00
NeKz
fe00a6f3e3 fix(rest): add missing files for editMessage (#3087)
* fix(rest): add missing files for editMessage

* fix(rest): extend attachment test with editMessage

* fix(types):  remove null from files type
2023-07-23 20:56:22 +00:00
8au
d0db3420f7 fix: 'INVITE_DELETE' event now uses 'handleInviteDelete' (previously used 'handleInviteCreate') (#3064)
* fix: Fixed an issue which would cause the 'INVITE_DELETE' event to be passed into 'INVITE_CREATE'.

* chore: updated guild counts for appy and ai image generator

* chore: removed duplicate line in the message transformer
2023-07-23 15:54:34 -05:00
dependabot[bot]
b2091adaf2 build(deps): bump semver from 6.3.0 to 6.3.1 (#3067)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 20:52:06 +00:00
dependabot[bot]
8523b6ee91 build(deps): bump semver from 5.7.1 to 5.7.2 in /website (#3068)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 20:51:53 +00:00
dependabot[bot]
a244070548 build(deps): bump semver from 6.3.0 to 6.3.1 in /proxies/rest (#3069)
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 20:51:41 +00:00
dependabot[bot]
11180a538c build(deps): bump word-wrap from 1.2.3 to 1.2.4 (#3088)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 20:47:23 +00:00
dependabot[bot]
8c73447da2 build(deps): bump word-wrap from 1.2.3 to 1.2.4 in /website (#3089)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-23 20:46:49 +00:00
Jonathan Ho
8d1ba2a1cc test(rest): fix test for new user system (#3057)
* test(rest): fix test for new user system

* Update user.spec.ts
2023-06-18 22:20:31 +00:00
Jovan Jovanovic
9f0e4d3dd7 fix(types,bot) Fix global name typing (#3053)
* fix(types,bot): fix global_name typing

* fix(types): include global_name in the comment

* fix(utils): add global_name to users
2023-06-17 19:15:57 -05:00
Endy
c12472ea03 fix(gateway): fix deno detection for ws (#3052)
credit: @Yaikava for the improved detection method
2023-06-13 15:40:25 +00:00
Andreas Fink
0d08c57d56 feat(bot): Add guildUnavailable event, fixes #3028 (#3044)
* feat(bot): Add guildUnavailable event, fixes #3028

* Update packages/bot/src/handlers/guilds/GUILD_DELETE.ts

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-06-13 15:39:48 +00:00
Awesome Stickz
f9a5fc1afe feat: add support for new username system (#3035)
* feat: add support for new username system

* fix: default avatar calculation in avatarUrl(), also remove support for old system

* fix: use description from docs for user.globalName

* fix: typings

* fix: avatarUrl() to support both old and new username system
2023-06-13 15:39:06 +00:00
Skillz4Killz
c9c510b0cd Merge branch 'main' of https://github.com/discordeno/discordeno 2023-06-06 16:28:56 +00:00