Commit Graph

73 Commits

Author SHA1 Message Date
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
Skillz4Killz
aa2e5131ef fix: test local queue idea (#2301)
* fix: test local queue idea

* I HATE STUPIDEST DENO FMT

* try new error

* fix: url

* fix: with proper headers

* fix: cleanup
2022-06-17 13:01:26 -04:00
LTS20050703
c68d95bc90 Image Size 4096 (#2302)
* Image Size 4096

* deno fmt
2022-06-16 12:04:10 -04:00
Skillz4Killz
ccd8506c81 Auto mod blame wolf (#2267)
* feat(meister): add automod

* fix(test); rest error with code

* fix(rest): log error nicely

* fix(test): disable benchmark test until gateway rewrite

* fix(automod): enum should start with 1

* fix(helper): better undefined handling of metadata

* fix(transfomrers): automod transformers

* fix(tests): add some automod tests

* Update types/shared.ts

Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com>

* fix: changes discord made recently

* fix(fmt): i hate deno fmt but i love itoh

Co-authored-by: meister03 <69507874+meister03@users.noreply.github.com>
Co-authored-by: LTS20050703 <87189679+lts20050703@users.noreply.github.com>
2022-06-15 11:25:53 -04:00
Skillz4Killz
3af25bcc1d BREAKING(helpers): editBotNickname can return undefined 2022-05-31 14:21:16 +00:00
Skillz4Killz
9473a1d798 BREAKING(helpers): getWebhook can return undefined 2022-05-31 13:35:28 +00:00
Skillz4Killz
9b609a58d5 BREAKING(helpers): getUser can return undefined 2022-05-31 12:47:56 +00:00
Skillz4Killz
6b4160e066 BREAKING(helpers): getMember user isnt in server 2022-05-30 22:18:38 +00:00
Skillz4Killz
695fb7a4bc BREAKING(helpers): getDmChannel if no dm perms 2022-05-30 22:18:08 +00:00
Skillz4Killz
e05e409d76 BREAKING(helper): fix getBan if not banned 2022-05-30 22:17:37 +00:00
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
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