Commit Graph
111 Commits
Author SHA1 Message Date
Skillz4Killz 099d4f4d49 fix(tests): migrate scheduled events tests 2022-05-30 14:48:23 +00:00
Skillz4Killz e34a265ba4 fix(test): migrate message related unit tests 2022-05-29 17:56:41 +00:00
Skillz4Killz 36c3b15f2b fix: deno fmt is trash 2022-05-29 15:10:20 +00:00
Skillz4Killz 5e492f0d49 fix(helpers): editGuild options spread out 2022-05-29 14:54:54 +00:00
Skillz4Killz 05ba25b23f fix(helpers): getGuild bug on guild doesnt exist 2022-05-29 14:54:22 +00:00
Skillz4Killz 0aff36afbe fix(utils): add hasProperty back. 2x faster than Reflect.has 2022-05-28 13:39:46 +00:00
LTS20050703andITOH 2018919fe2 feat(rest,types): slash command permissions v2 (#2226)
* Slash command perms v2

Closes: #2184
Upstream: discord/discord-api-docs@4a3b20a

- Nuke batchEditApplicationCommandPermissions (https://discord.com/developers/docs/interactions/application-commands#batch-edit-application-command-permissions)
- update JSDocs Comments (like, a lot, probably will revert unnecessary comments changes next commit)
- Add id to upsertApplicationCommands options

* fix typos

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

* docs: add regex to application command `name`

Co-authored-by: ITOH <to@itoh.at>
2022-05-25 22:32:47 +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 b00504ce07 perf(plugins/helpers,rest,site,template)!: uppercase rest methods (#2252)
* perf(plugins/helpers,rest,site,template)!: uppercase rest methods
There is no need for us to pass the methods in lower case and then use the `toUpperCase()` method everywhere. Therefore this PR changes every lowercase method to be uppercase (eg. `"get"` => `"GET"`).

* template is old version
2022-05-25 20:45:51 +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 72fec3a4c6 fix(rest): sendInteractionResponse file upload (#2239)
* fix(rest): `sendInteractionResponse` file upload

* f
2022-05-25 15:38:13 +01:00
ITOH be5bcb5bbc fix(rest)!: editApplicationCommandPermissions (#2238)
* fix(rest)!: `editApplicationCommandPermissions`
 - add `bearerToken` option
 - add headers to `RestPayload`
 - remove `batchEditApplicationCommandPermissions` since the related endpoint has been removed

* fix header prefix
2022-05-25 09:53:53 -04:00
凱恩Kane f7f4b7c384 targetApplicationId missing (#2244) 2022-05-25 09:48:57 -04:00
4aab0df69c docs(rest,types): Update AuditLog related comments (#2225)
* deno fmt

* Update audit log interfaces

Closes: #2214
Upstream: https://github.com/discord/discord-api-docs/commit/618691228a5d8d5ffc1953cbd656f98a54d24cfb

Update GetAuditLogs interface
Update AuditLogEvents enum
Update DiscordAuditLog and DiscordAuditLogEntry interfaces JSDOcs
Update DiscordAuditLogChange interface (https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-exceptions)

* """fixed"""

* Fix typos

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

* deno fmt

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-05-16 08:45:56 -04:00
LTS20050703andITOH c2e3ef47b9 fix(rest,types): getArchivedThreads before option and wrong return type (#2222)
* deno fmt

* fix: getArchivedThreads options and return type

* Update types/discord.ts

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

* convert before number timestampt to ISO string

Co-authored-by: ITOH <to@itoh.at>
2022-05-15 14:14:45 -04:00
LTS20050703 c53aad2ea8 style: deno fmt (#2219) 2022-05-14 12:03:17 +01:00
7caab52b68 Forum channel (#2160)
* [WIP] Forum Channels

* Delete package-lock.json

🤕

* Add Message typings and fix createForumPost

* Remove unnecessary comment

* Update helpers/channels/forums/createForumPost.ts

Use transformer

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>

* Update helpers/channels/forums/createForumPost.ts

Use Pascal case for `CreateForumPostWithMessage`

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

* Update helpers/channels/forums/createForumPost.ts

Use Pascal case for `CreateForumPostWithMessage`

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>

* Remove unneeded types

* Revert Review and Edit it

* Add reason

Co-authored-by: meister03 <root@_HOSTNAME_>
Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-05-13 10:28:53 -04:00
LTS20050703 749dafd1ce add default_member_permissions and dm_permission (#2215)
* add default_member_permissions and dm_permission

* update application command transformer and interfaces

* fix type error
2022-05-13 10:25:15 -04:00
453fd45ef7 localization updates (#2206)
* localization updates

Upstream: https://github.com/discord/discord-api-docs/commit/2f854d3fd675a9953d1bb8d6858a03c8a9642337

Types: DiscordApplicationCommmand and DiscordApplicationCommandOption: Update documentation

Types: DiscordActivityButton: Add documentation link

Helper: upsertApplicationCommand: All fields are optional, but any fields provided will entirely overwrite the existing values of those fields.

* revert unrelated changes

* update SLASH_COMMANDS_NAME_REGEX

* createApplicationCommand options: AtLeastOne instead of Partial

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-05-13 09:25:57 -04:00
LTS20050703andITOH de292cd613 add support for get guild bans options (#2207)
* add support for get guild bans options

* fix getBans query string params

* fix typo

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

* Update helpers/guilds/getBans.ts

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

Co-authored-by: ITOH <to@itoh.at>
2022-05-13 08:59:47 -04:00
LTS20050703andITOH b542c65ac1 Misc documentation fixes, mostly around optional fields and return types (#2194)
* update createRole

* misc docs fixes, mostly optional

* parity: return undefined for 204 no content response

* undo return undefined

* undo createRole changes
https://github.com/discordeno/discordeno/pull/2195#pullrequestreview-971240431

* undo reordering

Co-authored-by: ITOH <to@itoh.at>
2022-05-13 08:54:20 -04:00
LTS20050703andITOH 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
a72ded7615 fix getPruneCounts query string params (#2211)
* fix getPruneCounts query string params

* Apply suggestions from code review

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

Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-05-12 14:18:36 -04:00
LTS20050703andITOH 9d94a8616b update createEmoji (#2196)
Co-authored-by: ITOH <to@itoh.at>
2022-05-12 14:12:32 -04:00
d4e109a48e Add default_auto_archive_duration to createChannel helper options (#2202)
* Add default_auto_archive_duration to createChannel helper options

* Update helpers/channels/createChannel.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>
2022-05-12 13:53:51 -04:00
Skillz4KillzandLTS20050703 5a4fef855e Proxy delete channel tests (#2174)
* feat: delete channel tests

* fix: use new tests in ci

* Update testss/deps.ts

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>

Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-05-08 09:57:06 -04:00
8aa3be43bd fix: Add value for textinput (#2163)
Co-authored-by: meister03 <root@_HOSTNAME_>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-04-12 06:28:59 -04:00
Skillz4Killz 7ffc7127b9 fix: input text required prop 2022-04-11 21:01:13 +00:00
Skillz4Killz fd6b11a66b fix: add sendStartNotification to stages. Closes #2152 2022-03-31 14:01:25 +00: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 4c9522b83f fix: create emoji typings descriptin 2022-03-27 18:42:31 +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 54708c97ba fix: i hate deno fmt 2022-03-26 00:14:07 +00:00
Skillz4Killz b06f6d2512 fix: remove get query loop loop de loop loop 2022-03-26 00:11:47 +00:00
Skillz4Killz 80d2e94840 fix: use patch not get 2022-03-25 22:02:30 +00:00
Skillz4Killz d2d0dd37ae fix: fmt 2022-03-25 19:31:16 +00:00
Skillz4Killz fbbac43053 fix: constant urls endpoints need to be functions 2022-03-25 19:23:44 +00:00
Skillz4Killz 0ea64491a3 fix: dumb deno fmt 2022-03-25 18:30:30 +00:00
Skillz4Killz 7bf65ab1c1 fix: transform embed to discord form 2022-03-25 18:28:25 +00:00
Skillz4Killz 3bec0cea4d fix: use embed reverse transformer 2022-03-25 12:32:59 +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
ITOH c830055a52 style: run deno fmt 2022-03-23 21:23:27 +01:00
Skillz4Killz 213b4eebdf fix: remove deprecated props 2022-03-22 22:57:16 +00:00
Skillz4Killz 60a7ba5c11 fix: add modifyRolePositions 2022-03-22 21:51:30 +00:00
LTS20050703andSkillz4Killz 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 fe42864b00 fix: add nitroStickerPacks helper. Closes #2095 2022-03-21 12:08:43 +00:00
Skillz4Killz 1ea7c466b6 fix: lil bit of cleanup 2022-03-21 08:07:02 +00:00
Skillz4Killz 67d8064be3 fix: typeguard for context cmds 2022-03-21 08:05:41 +00:00