Commit Graph

9 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
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
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
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
67d8064be3 fix: typeguard for context cmds 2022-03-21 08:05:41 +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
Skillz4Killz
8aaea9f339 refactor!: move dirs outside of src/ (#2032) 2022-02-11 09:49:53 +00:00