Commit Graph
870 Commits
Author SHA1 Message Date
Endy 2b83d691b3 Toggle Interaction.acknowledged in defer (#3022) 2023-05-06 14:57:43 +00:00
Skillz4Killz 4a6e22d192 fix: benchmark type bug 2023-05-05 23:42:14 +00:00
Skillz4Killz 1d232ac34a fix: interaction.edit type 2023-05-05 23:27:40 +00:00
EndyandSkillz4Killz 37aa4198c2 feat(bot): add more helper functions to BaseInteraction (#3018)
* Add more helper functions for `BaseInteraction`

- Breaking changes for `respond`
  - `response` now takes `InteractionCallbackData`
  - `options` is now `ephemeral: boolean`
- Added `edit`, `defer` and `delete`

* Add comments and `acknowledged` check for `defer`

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

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

* Revert `respond` options, rename `ephemeral` to `private`

* Fix typo

* Fix arg name

- Renamed `private` to `isPrivate` to prevent reserved name collision
- Optional chaining for `options`

* Apply suggestions from code review

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-05-05 15:52:49 +00:00
Filip Sobol 71eb5c7fbf Rename FormLayout to ForumLayout (#3019) 2023-05-05 15:48:52 +00:00
Skillz 5c42bdd3ed Merge branch 'main' of https://github.com/discordeno/discordeno into main 2023-04-28 14:14:33 -05:00
Skillz 4dd7ca71c5 fix: interaction.respond typing 2023-04-28 14:14:29 -05:00
livelove1987 be142101e9 fix: Fixed message transformers (#3013) 2023-04-27 22:44:26 +00:00
Skillz e2d86ea644 fix: channel.parentId 2023-04-19 14:33:45 -05:00
Skillz b044211b27 fix: missing helpers 2023-04-19 14:00:42 -05:00
Skillz a6c5cc4ca9 fix: mark acknowledged when responding 2023-04-19 13:16:52 -05:00
Skillz fbeec8920c fix: add a file attachment test 2023-04-19 13:16:17 -05:00
Skillz4Killz e54f51a7af fix: hack in helpers again (#3008)
* fix: hack in helpers again

* fix: remaining type errors

* fix: weird linter issue
2023-04-19 12:57:36 -05:00
Skillz4Killz 7b06df4b1c feat:i interaction.respond 2023-04-19 04:21:50 +00:00
Awesome Stickz e70bfc3a81 fix(types): MessageActivityTypes.JoinRequest (#3007)
* fix(types): MessageActivityTypes.JoinRequest

* fix: docs links for typings

* use explicit values for enums
2023-04-19 04:19:29 +00:00
Skillz4Killz 06f3c93790 fix: handle completed request marking behavior bug 2023-04-17 18:45:57 +00:00
Skillz4Killz b496f4c1ac fix: being in a loop is not a good sign 2023-04-17 16:09:18 +00:00
Skillz4Killz 286a7c9f64 Merge branch 'main' of https://github.com/discordeno/discordeno 2023-04-17 16:00:07 +00:00
Skillz4Killz 250f524885 fix: some improvements to invalid bucket 2023-04-17 16:00:01 +00:00
Yaikava fd518cb554 🐛 - fix: bot pkg - gateway - prefer snakecase by default (#3006) 2023-04-16 23:53:02 +00:00
Awesome Stickz 85ea2d9b8c fix(bot): missing exports of types (#3004)
* fix(bot): missing exports of types

* fix: add other exports
2023-04-16 23:51:17 +00:00
Yaikava e9c011eef5 fix(rest): oauth2Application route (#3002) 2023-04-15 14:52:23 +02:00
ITOH 8ee3b59d90 fix(rest): only calculate bits if not undefined (#3000) 2023-04-14 18:52:41 +00:00
Jonathan Ho dda4d75de1 fix(rest,utils): reverse "refactor: use node-fetch" 6a6a334 (#2995) 2023-04-13 22:05:18 +00:00
Skillz4Killz e19eca5e80 fix: transformer customizers for channel, member, role, user 2023-04-10 04:09:45 +00:00
Skillz4Killz cebe1f4056 Merge branch 'main' of https://github.com/discordeno/discordeno 2023-04-10 03:24:17 +00:00
Skillz4Killz 987728ab78 fix: channel create guild id was missing 2023-04-10 03:23:52 +00:00
dfb7f93dd8 fix(types): DiscordCreateApplicationCommand.description is optional (#2986)
* Made the description optional for creating commands

* Update packages/types/src/discord.ts

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

---------

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-04-09 23:47:15 +00:00
DeveloperDragonandITOH da0590120f feat(bot): add Interaction.data.type for Command interactions (#2987)
* Add type property to data

* Add back type I accidentally removed

---------

Co-authored-by: ITOH <to@itoh.at>
2023-04-09 21:59:49 +00:00
DeveloperDragon 5638766882 Fix option for preferSnakeCase (#2984) 2023-04-09 20:34:12 +00:00
Skillz4Killz 40eaf1757c refactor(bot)!: interaction.data.guildId is useless (#2982) 2023-04-08 16:32:31 +02:00
Skillz4Killz 8ed5aed3a3 fix: linter errors 2023-04-07 17:56:36 +00:00
Skillz4Killz 3e88d5c956 fix: slight code improvement 2023-04-07 17:44:29 +00:00
Skillz4Killz a571431cf6 feat: channel, member, role with new style 2023-04-07 17:21:29 +00:00
Skillz4Killz b5cca2e1c9 feat: transformer user new style 2023-04-06 06:50:27 +00:00
Skillz4Killz e318e44752 feat: interaction transformer new style 2023-04-05 21:08:04 +00:00
ITOH 60d1c2d3eb refactor(types)!: remove PRIVATE_THREADS guild feature (#2974)
Closes: https://github.com/discordeno/discordeno/issues/2847
2023-04-05 13:45:53 -05:00
Skillz4Killz 32fe8b8d88 fix: remove private thread 2023-04-05 18:41:36 +00:00
Skillz4KillzandJonathan Ho 3127531a46 fix: finish bucket file coverage (#2968)
* fix: finish bucket file coverage

* Update packages/utils/tests/bucket.spec.ts

Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>

---------

Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
2023-04-05 13:32:18 -05:00
ITOH f249e58c68 feat(bot,types): add missing automod trigger metadata (#2973) 2023-04-05 17:55:32 +00:00
ITOH 927ee42ce0 fix(rest): set the correct auth header when using proxy (#2969) 2023-04-04 22:24:20 +00:00
Skillz4KillzandJonathan Ho f8afb94aa0 feat: commandOptionsParser util (#2961)
* feat: commandOptionsParser util

* test(utils): fix missing import it

* fix: support mentionable and attachments

* fix: finish coverage

* fix: when typings fail gg

---------

Co-authored-by: Jonathan Ho <heiheiho000@gmail.com>
2023-04-04 11:47:49 +00:00
ITOH 8c9c3d53bf refactor(rest)!: make invalid bucket lazy (#2967)
* refactor(rest): make invalid bucket lazy
Instead of using timeouts we should aim to use a lazy bucket system.

* that might be better

* fix tests
2023-04-04 03:34:34 +00:00
ITOH e3549a8675 fix(rest): does not need to set the absolute url (#2966) 2023-04-03 20:00:30 +00:00
ITOH 895db84d34 refactor(rest): add header constants (#2962)
* refactor(rest): add header constants

* spelling error

* export
2023-04-03 19:01:14 +00:00
Skillz4KillzandITOH 04d7db89a5 fix: export transformers na dhandler (#2959)
Co-authored-by: ITOH <to@itoh.at>
2023-04-03 17:28:11 +00:00
ITOHandSkillz4Killz 088fd12513 fix(bot)!: rename auditLogEntryCreate to guildAuditLogEntryCreate (#2952)
* fix(bot)!: rename `auditLogEntryCreate` to `guildAuditLogEntryCreate`

* need to start small

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

* also remove this

* suggestions

---------

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2023-04-03 15:52:34 +00:00
ITOH 7f9459b435 feat(rest): add isProxied (#2957)
Adds the `isProxied` property to rest.
This effectively removes the `startWith('https://discord.com/api')` check.
2023-04-03 15:51:47 +00:00
ITOH 50282f9190 refactor(rest)!: improve sendRequest (#2956)
* refactor(rest)!: refactor `sendRequest`
 - Removed `url` in favour of `route`. This change will effectively remove a bunch of unnecessary checks from dd. Also this changes how rest proxies have to pass the route to the `makeRequest` function. But since it will just require you to pass `req.route + req.query` it is an improvement compared to `rest.baseUrl + req.route + req.query`.
 - Introduced `HttpResponseCodes` an internal enum to remove magic numbers.
 - Improved the rate limted response handling. Made it simpler.
 - Removed unnecessary `JSON.stringify(await result.json())` since `await result.text()` does effectively the same.
 - Changed the anti memor leak `response.json()` to `response.arrayBuffer()` since latter does not do any additional processing.

* .

* forgot to fix that
2023-04-03 15:23:01 +00:00
Jonathan Ho fda9ef25f2 fix(bench): missing app id (#2955) 2023-04-03 03:05:20 +00:00