Commit Graph

55 Commits

Author SHA1 Message Date
LTS20050703
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
LTS20050703
4aab0df69c docs(rest,types): Update AuditLog related comments (#2225)
* deno fmt

* Update audit log interfaces

Closes: #2214
Upstream: 618691228a

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
LTS20050703
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
meister03
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
LTS20050703
453fd45ef7 localization updates (#2206)
* localization updates

Upstream: 2f854d3fd6

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
LTS20050703
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
LTS20050703
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
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
LTS20050703
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
LTS20050703
9d94a8616b update createEmoji (#2196)
Co-authored-by: ITOH <to@itoh.at>
2022-05-12 14:12:32 -04:00
LTS20050703
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
Skillz4Killz
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
meister03
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
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
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
Skillz4Killz
0e6c45b017 fix: webhook creation 2022-03-19 09:26:35 +00:00
Yuzu
33bafd1f6c fix: get rid of type errors for now (#2113) 2022-03-18 00:19:55 -04:00
Skillz4Killz
2a84ac982e fix: fmt 2022-03-16 02:00:10 +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
LTS20050703
79dbf690dc fix editMessage interface and function (#2054)
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-02-25 10:23:32 -05:00
Skillz4Killz
5bb7ed8f08 Merge branch 'main' of https://github.com/discordeno/discordeno into main 2022-02-21 05:17:13 +00:00