Commit Graph

10 Commits

Author SHA1 Message Date
Skillz4Killz
bbbe21ebf2 BREAKING: add docs (#2442)
* refactor(helpers): Organise functions. (#2425)

* refactor: Move stage instance helper functions into `/stages` subdirectory.

* refactor: Move `followChannel.ts` to `/announcements` subdirectory.

* refactor: Move `updateVoiceState.ts` to `/guilds` directory.

* refactor: Move `getPins.ts` to `/messages` directory.

* refactor: Move voice-related helper functions into `/voice` subdirectory.

* refactor: Rename `/scheduledEvents` to `/events`.

* refactor: Move widget-related helper functions into `/widgets` subdirectory.

* refactor: Make `/integrations` a subdirectory of `/guilds`.

* refactor: Move helper functions related to interaction responses into the `/responses` subdirectory.

* refactor: Move `verifySignature.ts` to `/util` directory.

* refactor: Move `getChannelInvites.ts` to `/channels` directory.

* refactor: Make `/invites` a subdirectory of `/guilds`.

* refactor: Move reaction-related helper functions into the /reactions subdirectory.

* refactor: Move `getApplicationInfo.ts` into the `/misc` directory.

* refactor: Move voice-related helper functions from `/voice` to `/guilds/voice`.

* fix: Update and simplify type imports.

* refactor!(helpers): Rename helpers to match Discord API. Create a 1:1 helper-to-endpoint correspondence. (#2427)

* refactor: Move stage instance helper functions into `/stages` subdirectory.

* refactor: Move `followChannel.ts` to `/announcements` subdirectory.

* refactor: Move `updateVoiceState.ts` to `/guilds` directory.

* refactor: Move `getPins.ts` to `/messages` directory.

* refactor: Move voice-related helper functions into `/voice` subdirectory.

* refactor: Rename `/scheduledEvents` to `/events`.

* refactor: Move widget-related helper functions into `/widgets` subdirectory.

* refactor: Make `/integrations` a subdirectory of `/guilds`.

* refactor: Move helper functions related to interaction responses into the `/responses` subdirectory.

* refactor: Move `verifySignature.ts` to `/util` directory.

* refactor: Move `getChannelInvites.ts` to `/channels` directory.

* refactor: Make `/invites` a subdirectory of `/guilds`.

* refactor: Move reaction-related helper functions into the /reactions subdirectory.

* refactor: Move `getApplicationInfo.ts` into the `/misc` directory.

* refactor: Move voice-related helper functions from `/voice` to `/guilds/voice`.

* fix: Update and simplify type imports.

* refactor: Rename `followChannel` -> `followAnnouncementChannel`.

* refactor: Rename `createForumPost` -> `startForumThread`.

* refactor: Normalise keyword `update` -> `edit`.

* refactor: Rename `addToThread` -> `addThreadMember`.

* refactor: Rename `ChannelOverwrite` -> `ChannelPermissions`.

* refactor: Rename `startTyping` -> `triggerTypingIndicator`.

* refactor: Rename `swapChannels` -> `editChannelPositions`.

* refactor: Rename `getPins` -> `getPinnedMessages`.

* refactor: Rename `publish` -> `crosspost`.

* refactor: Normalise keyword `modify` -> `edit`.

* refactor: Normalise naming.

* fix: Imports.

* style: Remove empty object.

* refactor: Split `getArchivedThreads` into three files for public, private and private joined threads.

* refactor: Split `getApplicationCommands` into two files, for guild and global commands respectively.

* refactor: Split `getApplicationCommand` into two files, for guild and global commands respectively.

* fmt: Organise imports.

* misc: Include application command reverse transformer.

* misc: Make ordering of fields match up with the Discord API.

* fix: Add missing payload properties.

* refactor: Split `createApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommands` into two files, for guild and global commands respectively.

* fix: Update exports.

* refactor: Split `deleteApplicationCommand` into two files, for guild and global commands respectively.

* fix: Add missing exports.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* feat: Create `getInteractionResponse.ts`.

* refactor: Matching API: `InteractionResponse` -> `FollowupMessage`.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Remove `/followups` directory in favour of newly created files in `/responses`.

* refactor: Rename `bot`/`self` -> `own`, `others` -> `user`.

* refactor: Split function into `deleteOwnReaction` and `deleteUserReaction`.

* refactor: Reduce code duplication in processing reaction string.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Rename function name.

* misc: Add aliases to functions to reduce breakage.

* refactor: Rename `startForumThread` -> `createForumThread`.

* misc: Move types from helper file to `/types` and create transformer.

* fix: Imports.

* style: Rename parameter `command` -> `payload`.

* feat: Create interaction response transformer.

* misc: Adapt code to use the interaction response transformer.

* misc: Adapt code to use interaction response transformer.

* refactor: Re-include the keyword `Override` in the file + function names.

* refactor: Rename `updateVoiceState` -> `editVoiceState` for consistency reasons.

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

* BREAKING: docs(helpers): Document helper functions. (#2437)

* refactor: Move stage instance helper functions into `/stages` subdirectory.

* refactor: Move `followChannel.ts` to `/announcements` subdirectory.

* refactor: Move `updateVoiceState.ts` to `/guilds` directory.

* refactor: Move `getPins.ts` to `/messages` directory.

* refactor: Move voice-related helper functions into `/voice` subdirectory.

* refactor: Rename `/scheduledEvents` to `/events`.

* refactor: Move widget-related helper functions into `/widgets` subdirectory.

* refactor: Make `/integrations` a subdirectory of `/guilds`.

* refactor: Move helper functions related to interaction responses into the `/responses` subdirectory.

* refactor: Move `verifySignature.ts` to `/util` directory.

* refactor: Move `getChannelInvites.ts` to `/channels` directory.

* refactor: Make `/invites` a subdirectory of `/guilds`.

* refactor: Move reaction-related helper functions into the /reactions subdirectory.

* refactor: Move `getApplicationInfo.ts` into the `/misc` directory.

* refactor: Move voice-related helper functions from `/voice` to `/guilds/voice`.

* fix: Update and simplify type imports.

* refactor: Rename `followChannel` -> `followAnnouncementChannel`.

* refactor: Rename `createForumPost` -> `startForumThread`.

* refactor: Normalise keyword `update` -> `edit`.

* refactor: Rename `addToThread` -> `addThreadMember`.

* refactor: Rename `ChannelOverwrite` -> `ChannelPermissions`.

* refactor: Rename `startTyping` -> `triggerTypingIndicator`.

* refactor: Rename `swapChannels` -> `editChannelPositions`.

* refactor: Rename `getPins` -> `getPinnedMessages`.

* refactor: Rename `publish` -> `crosspost`.

* refactor: Normalise keyword `modify` -> `edit`.

* refactor: Normalise naming.

* fix: Imports.

* style: Remove empty object.

* refactor: Split `getArchivedThreads` into three files for public, private and private joined threads.

* refactor: Split `getApplicationCommands` into two files, for guild and global commands respectively.

* refactor: Split `getApplicationCommand` into two files, for guild and global commands respectively.

* fmt: Organise imports.

* misc: Include application command reverse transformer.

* misc: Make ordering of fields match up with the Discord API.

* fix: Add missing payload properties.

* refactor: Split `createApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommands` into two files, for guild and global commands respectively.

* fix: Update exports.

* refactor: Split `deleteApplicationCommand` into two files, for guild and global commands respectively.

* fix: Add missing exports.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* feat: Create `getInteractionResponse.ts`.

* refactor: Matching API: `InteractionResponse` -> `FollowupMessage`.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Remove `/followups` directory in favour of newly created files in `/responses`.

* refactor: Rename `bot`/`self` -> `own`, `others` -> `user`.

* refactor: Split function into `deleteOwnReaction` and `deleteUserReaction`.

* refactor: Reduce code duplication in processing reaction string.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Rename function name.

* misc: Add aliases to functions to reduce breakage.

* refactor: Rename `startForumThread` -> `createForumThread`.

* misc: Move types from helper file to `/types` and create transformer.

* fix: Imports.

* style: Rename parameter `command` -> `payload`.

* feat: Create interaction response transformer.

* misc: Adapt code to use the interaction response transformer.

* misc: Adapt code to use interaction response transformer.

* docs: Document announcement channel helpers.

* docs: Document forum channel helpers.

* docs: Document stage instance helpers.

* misc: Update wording.

* docs: Document thread channel helpers.

* refactor: Re-include the keyword `Override` in the file + function names.

* refactor: Rename `updateVoiceState` -> `editVoiceState` for consistency reasons.

* docs: Document channel helpers.

* docs: Use `parameters` instead of `options` for descriptions.

* docs: Document guild discovery helpers.

* docs: Document emoji helpers.

* docs: Add missing information about which gateway events are fired.

* docs: Document auto moderation helpers.

* docs: Document scheduled event helpers.

* docs: Document integration helpers.

* docs: Document invite helpers.

* refactor: Rename `editWidget` -> `editWidgetSettings`.

* docs: Document guild widget helpers.

* docs: 'event' -> 'gateway event'.

* refactor: Rename `getAuditLogs` -> `getAuditLog`.

* docs: Document guild helpers.

* refactor: Rename `upsert*ApplicationCommand` -> `edit*ApplicationCommand`.

* docs: Document application command helpers.

* docs: Improve consistency in indentation.

* docs: Document interaction response + follow-up message helpers.

* docs: Document gateway event firings for endpoints.

* refactor: Delete `editBotNickname` due to being a subset of `editMember`.

* docs: Fix inconsistency.

* docs: Document member helpers.

* docs: Document reaction helpers.

* docs: Improve consistency.

* docs: Document message helpers.

* docs: Document role helpers.

* docs: Document guild template helpers.

* docs: Fix incorrect gateway event.

* refactor: Rename `sendWebhookMessage` -> `executeWebhook`.

* docs: Document webhook helpers.

* docs: Document voice helpers.

* fmt: Run Deno formatter.

* docs: Improve consistency.

* refactor: Rename the `/widgets` directory to `/widget`.

* fmt: Run Deno formatter.

* misc: Re-add the deleted `editBotNickname()` helper. (#2443)

* refactor: Move stage instance helper functions into `/stages` subdirectory.

* refactor: Move `followChannel.ts` to `/announcements` subdirectory.

* refactor: Move `updateVoiceState.ts` to `/guilds` directory.

* refactor: Move `getPins.ts` to `/messages` directory.

* refactor: Move voice-related helper functions into `/voice` subdirectory.

* refactor: Rename `/scheduledEvents` to `/events`.

* refactor: Move widget-related helper functions into `/widgets` subdirectory.

* refactor: Make `/integrations` a subdirectory of `/guilds`.

* refactor: Move helper functions related to interaction responses into the `/responses` subdirectory.

* refactor: Move `verifySignature.ts` to `/util` directory.

* refactor: Move `getChannelInvites.ts` to `/channels` directory.

* refactor: Make `/invites` a subdirectory of `/guilds`.

* refactor: Move reaction-related helper functions into the /reactions subdirectory.

* refactor: Move `getApplicationInfo.ts` into the `/misc` directory.

* refactor: Move voice-related helper functions from `/voice` to `/guilds/voice`.

* fix: Update and simplify type imports.

* refactor: Rename `followChannel` -> `followAnnouncementChannel`.

* refactor: Rename `createForumPost` -> `startForumThread`.

* refactor: Normalise keyword `update` -> `edit`.

* refactor: Rename `addToThread` -> `addThreadMember`.

* refactor: Rename `ChannelOverwrite` -> `ChannelPermissions`.

* refactor: Rename `startTyping` -> `triggerTypingIndicator`.

* refactor: Rename `swapChannels` -> `editChannelPositions`.

* refactor: Rename `getPins` -> `getPinnedMessages`.

* refactor: Rename `publish` -> `crosspost`.

* refactor: Normalise keyword `modify` -> `edit`.

* refactor: Normalise naming.

* fix: Imports.

* style: Remove empty object.

* refactor: Split `getArchivedThreads` into three files for public, private and private joined threads.

* refactor: Split `getApplicationCommands` into two files, for guild and global commands respectively.

* refactor: Split `getApplicationCommand` into two files, for guild and global commands respectively.

* fmt: Organise imports.

* misc: Include application command reverse transformer.

* misc: Make ordering of fields match up with the Discord API.

* fix: Add missing payload properties.

* refactor: Split `createApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommand` into two files, for guild and global commands respectively.

* refactor: Split `upsertApplicationCommands` into two files, for guild and global commands respectively.

* fix: Update exports.

* refactor: Split `deleteApplicationCommand` into two files, for guild and global commands respectively.

* fix: Add missing exports.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* feat: Create `getInteractionResponse.ts`.

* refactor: Matching API: `InteractionResponse` -> `FollowupMessage`.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Remove `/followups` directory in favour of newly created files in `/responses`.

* refactor: Rename `bot`/`self` -> `own`, `others` -> `user`.

* refactor: Split function into `deleteOwnReaction` and `deleteUserReaction`.

* refactor: Reduce code duplication in processing reaction string.

* refactor: Separate file into two to make 1 file correspond to 1 endpoint.

* refactor: Rename function name.

* misc: Add aliases to functions to reduce breakage.

* refactor: Rename `startForumThread` -> `createForumThread`.

* misc: Move types from helper file to `/types` and create transformer.

* fix: Imports.

* style: Rename parameter `command` -> `payload`.

* feat: Create interaction response transformer.

* misc: Adapt code to use the interaction response transformer.

* misc: Adapt code to use interaction response transformer.

* docs: Document announcement channel helpers.

* docs: Document forum channel helpers.

* docs: Document stage instance helpers.

* misc: Update wording.

* docs: Document thread channel helpers.

* refactor: Re-include the keyword `Override` in the file + function names.

* refactor: Rename `updateVoiceState` -> `editVoiceState` for consistency reasons.

* docs: Document channel helpers.

* docs: Use `parameters` instead of `options` for descriptions.

* docs: Document guild discovery helpers.

* docs: Document emoji helpers.

* docs: Add missing information about which gateway events are fired.

* docs: Document auto moderation helpers.

* docs: Document scheduled event helpers.

* docs: Document integration helpers.

* docs: Document invite helpers.

* refactor: Rename `editWidget` -> `editWidgetSettings`.

* docs: Document guild widget helpers.

* docs: 'event' -> 'gateway event'.

* refactor: Rename `getAuditLogs` -> `getAuditLog`.

* docs: Document guild helpers.

* refactor: Rename `upsert*ApplicationCommand` -> `edit*ApplicationCommand`.

* docs: Document application command helpers.

* docs: Improve consistency in indentation.

* docs: Document interaction response + follow-up message helpers.

* docs: Document gateway event firings for endpoints.

* refactor: Delete `editBotNickname` due to being a subset of `editMember`.

* docs: Fix inconsistency.

* docs: Document member helpers.

* docs: Document reaction helpers.

* docs: Improve consistency.

* docs: Document message helpers.

* docs: Document role helpers.

* docs: Document guild template helpers.

* docs: Fix incorrect gateway event.

* refactor: Rename `sendWebhookMessage` -> `executeWebhook`.

* docs: Document webhook helpers.

* docs: Document voice helpers.

* fmt: Run Deno formatter.

* docs: Improve consistency.

* refactor: Rename the `/widgets` directory to `/widget`.

* fmt: Run Deno formatter.

* feat: Re-add `editBotNickname.ts`.

* Update helpers/members/editBotNickname.ts

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

* fix: tests

* fix: bot member tests

* fix: remove submode

* fix: edit bot member returns full member

Co-authored-by: Dorian Oszczęda <vxern@wordcollector.co.uk>
2022-09-08 20:12:34 -05:00
meister03
aca0e3cf1b Merge Dev into Main (#2345)
* Simplify SfetchMembers (#2339)

Co-authored-by: meister03

* Create leaveVoiceChannel.ts (#2342)

* Update editFollowupMessage.ts (#2344)

* Update editInteractionResponse.ts (#2343)

* Update editMessage.ts (#2341)

* Update calculateShardId.ts

Fix wrong shardId calculations

* Add Role Icon to Edit (#2346)

Co-authored-by: meister03

* Add mix max length (#2347)

Co-authored-by: meister03

* style: deno fmt

* Fix Disabled Options (#2368)

Co-authored-by: meister03 <meisterpi@gmail.com>

* Add app_permissions (#2369)

Co-authored-by: meister03 <meisterpi@gmail.com>

* thread_id instead of threadId (#2378)

Co-authored-by: Veeti K <veeti@veetik.com>

* feat: Create `ApplicationCommandFlags` enumerator. (#2384)

Co-authored-by: vxern <vxern@wordcollector.co.uk>

* Small Changes in a bulk pr to close the issues (#2370)

* Initial Commit

* Close #2364

* Add preset whitelist to automod #2356 -> Resolve Issue

* Close [api-docs] AutoMod message intent updates (#5083) #2330

* Breaking Channge | [api-docs] Update message type names (#5093)

* message.interaction.name changed attitude | [api-docs] Update Change_Log.md #2333

* #2333 also closes #2316

* Clarify 45 chars length | Add those on permission plugins | [api-docs] text input label has max 45 characters (#4689) #2137

* Clarify webhook naming restrictions (#4625) #2094

* 8th August Webhook new View Channel perm | Closes #2363

* 8th August Webhook new View Channel perm | Closes #2363

* Document thread_name for execute webhook (#5007) #2263

* Close Update create and modify channel documentation (#4867) #2237

* unnecesary nullable tag in Modify Guild Member params (#5164) #2355

* deno fmt

* deno fmt

* Use .includefor disallowed webhook names"

* Add Missing Enums & #2367, #2362, #2361, #2371, #2372. #2349, #2358, #2325 back

* deno fmt :(

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

Co-authored-by: Tomato6966 <chris.pre03@gmail.com>
Co-authored-by: ITOH <to@itoh.at>
Co-authored-by: meister03 <meisterpi@gmail.com>
Co-authored-by: Veeti K <veeti@veetik.com>
Co-authored-by: vxern <vxern@wordcollector.co.uk>
Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-08-23 08:46:01 -04:00
ITOH
03996c5f58 refactor: revert "feat: base plugin lib idea (#2308)" (#2336)
* Revert "feat: base plugin lib idea (#2308)"

This reverts commit ffe7cdbc6f.

* fmt
2022-07-02 14:24:43 +01:00
Skillz4Killz
ffe7cdbc6f feat: base plugin lib idea (#2308)
* feat: base plugin lib idea

* fix: stuff

* fmt

* fix: imports and exports

* fix: errors & tests

* fix: remove logs
2022-06-18 18:46:37 -04:00
Endy
9610403b26 Made required optional for command option (#2234) 2022-05-22 08:39:08 -04:00
LTS20050703
2a330173d5 update application command localization jsdocs (#2199)
* update application command localization jsdocs

* update applicationCommand transformers

Co-authored-by: ITOH <to@itoh.at>
2022-05-12 14:16:45 -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
LTS20050703
8d4c0069b0 (transformers) return as Optionalize<typeof> (#2117)
* (transformers) return as Optionalize<typeof>

* fix check error

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2022-03-20 10:35:48 -04: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