Commit Graph

179 Commits

Author SHA1 Message Date
TriForMine 0f8ca1dec2 fix(handlers): add if payload.mentions 2021-04-13 13:47:06 +02:00
Skillz4Killz 381ea450ac Merge branch 'main' of https://github.com/discordeno/discordeno into main 2021-04-12 18:23:56 +00:00
Skillz4Killz 3ce5871eb9 fix: few more typings errors 2021-04-12 18:22:47 +00:00
ayntee b21df06719 Fix some types 2021-04-12 22:21:26 +04:00
ayntee 736c549c8e fix(handlers/MESSAGE_CREATE): prefix import stmt with .ts 2021-04-12 22:13:11 +04:00
ayntee c4b4d0903c types(handlers/MESSAGE_CREATE): fix typings 2021-04-12 22:12:38 +04:00
Skillz4Killz 8523a5ceea fix: more typing errors 2021-04-12 18:09:15 +00:00
ITOH 1da85da246 Update GUILD_UPDATE.ts 2021-04-12 11:47:47 +02:00
ITOH 84106e80ee Update APPLICATION_COMMAND_UPDATE.ts 2021-04-12 11:41:42 +02:00
ITOH b9bd29ebf8 fix 2021-04-12 09:30:45 +02:00
Skillz4Killz 51e27d8f17 types: fix new types issues (#829)
* feat: add tests for deleting channel overwrites

* fix: typings
2021-04-12 07:26:55 +01:00
TriForMine 5e6d749ffa tests: add roles tests (#822) 2021-04-11 19:41:15 +01:00
Skillz4Killz e163e2d109 fix: reaction remove tests (#811) 2021-04-10 22:03:32 +01:00
ITOH eac62c6bb0 fix(handlers/messages): reaction remove event handler logic 2021-04-10 11:15:06 +02:00
ITOH 7a6b4bf2d7 ref 2021-04-09 23:07:20 +02:00
ITOH dc9c33f0d4 f 2021-04-09 22:22:06 +02:00
ITOH 9312606100 lop 2021-04-09 21:37:13 +02:00
Skillz4Killz af997afc14 missing awaits 2021-04-09 15:57:46 +00:00
Skillz4Killz 3eaf1a5dcc fix: broken import errors (#779)
* fix: broken import errors

* fix: snake case name
2021-04-08 22:22:11 +04:00
ITOH ee4be53a45 f 2021-04-08 18:51:50 +02:00
ITOH 500b22167b Merge branch 'fix-handlers-invites' into fix-helpers 2021-04-07 09:39:16 +02:00
ITOH cb3db8efc8 Merge branch 'fix-handlers-integration' into fix-helpers 2021-04-07 09:39:10 +02:00
ITOH 1b6a95521b Merge branch 'fix-handlers-guilds' into fix-helpers 2021-04-07 09:39:01 +02:00
ITOH ad1bb64784 f 2021-04-06 21:46:11 +02:00
ITOH 59633b8ed6 f 2021-04-06 21:40:03 +02:00
ITOH 45877f9609 f 2021-04-06 21:38:35 +02:00
ITOH 28a6bca7e4 f 2021-04-06 21:37:32 +02:00
Skillz4Killz 47ed6f5652 fix: remove basicShards and allowNextShard (#755) 2021-04-05 09:37:25 +04:00
Skillz4Killz 1b8161e85b refactor: cleanup and fmt 2021-04-04 12:54:33 +00:00
Skillz4Killz 6bd233da6f Merge pull request #742 from discordeno/fix-errors-imports
fix: bunch of imports that were missing
2021-04-03 23:37:14 -04:00
Skillz4Killz 4031578f4b fix: more missing imports 2021-04-04 01:44:30 +00:00
Skillz4Killz e7d9b58c81 fix: import of DiscordGatewayPayload 2021-04-04 00:34:08 +00:00
ITOH 4e757c1c0f fix(handlers): add guildUnavailable event listener #735 2021-04-03 16:47:41 -04:00
ITOH 99c252d2d5 fix(handlers): add missing imports (#724)
* Update GUILD_EMOJIS_UPDATE.ts

* fix imports

Co-authored-by: ayntee <ayyantee@gmail.com>
2021-04-02 17:33:14 +04:00
ayntee 455cc6fb24 fix(handlers/GUILD_MEMBER_ADD): check if guildMember is undefined (#729)
* fix(handlers/GUILD_MEMBER_ADD): check if guildMember is undefined

* Update src/handlers/members/GUILD_MEMBER_UPDATE.ts

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

* Update src/handlers/members/GUILD_MEMBER_UPDATE.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/handlers/members/GUILD_MEMBER_UPDATE.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/handlers/members/GUILD_MEMBER_UPDATE.ts

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

* Update src/handlers/members/GUILD_MEMBER_UPDATE.ts

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

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
2021-04-02 17:31:25 +04:00
ITOH dd21008f90 fix(handlers): add missing imports (#723)
Co-authored-by: ayntee <ayyantee@gmail.com>
2021-03-31 21:51:46 +04:00
ayntee 79d57f0377 chore: fix import and exports 2021-03-29 23:47:31 +04:00
ayntee eaff54f90f refactor: rename *ID to *Id (#710)
* refactor: rename *ID to *Id

* Update src/helpers/commands/delete_slash_command.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/delete_slash_command.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/delete_slash_response.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/edit_slash_response.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/get_slash_command.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/send_interaction_response.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/upsert_slash_command.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/edit_widget.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/get_widget.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/get_widget.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/get_widget_image_url.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/get_widget_image_url.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/guilds/get_widget_settings.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update .gitignore

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update LICENSE

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/members/edit_bot_profile.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/members/edit_bot_profile.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/webhooks/create_webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/webhooks/delete_webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/webhooks/edit_webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/webhooks/execute_webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/webhooks/get_webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/rest/cache.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/rest/request.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/helpers/commands/delete_slash_response.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/constants.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/util/utils.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Revert docs file

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
2021-03-29 21:03:46 +04:00
ayntee 72b07574f2 types: add gateway types 2021-03-27 12:37:11 +04:00
ayntee b1512e0334 types: add gateway events types 2021-03-27 12:03:55 +04:00
ITOH c91c9d0870 types: remove entire types (#684) 2021-03-23 19:14:26 +04:00
ayntee 10cb9d7eb9 types(util): add case utility types (#683)
* types(util): add case utility types

* Rename *ID to *Id
2021-03-23 19:04:46 +04:00
ITOH 5821092e78 fix(handleres/guilds): unavailable guilds & guildDelete emit delay (#674)
Co-authored-by: ayntee <ayyantee@gmail.com>
2021-03-23 14:45:57 +04:00
ayntee e4fc09069f style: format files 2021-03-20 10:08:30 +04:00
ayntee 5125ffd308 refactor: replace util/cache with cache 2021-03-20 10:06:57 +04:00
ayntee 489aa6d166 refactor(handlers): move presence/* to misc/* (#677) 2021-03-17 16:32:45 +04:00
ayntee e852dc315a fix: export aliases from mod.ts 2021-03-15 15:41:46 +04:00
ayntee e9cbbbff7c refactor(helpers): separate functions into files (#667)
* refactor(helpers): separate functions into files

* idk

* idk
2021-03-13 08:10:31 -05:00
ITOH ebbcd762cf feat(util/permissions): improve permission-checking (#381)
* Update permissions.ts

* add(permissions): explaining comments

Since Discord permissions are quiet complex  it is better to have detailed comments explaining everything.

* docs: add better permissions jsdoc comments

* types: add missing errors

* change imports

* we want a string here

* strange commit here

* we need an s in tts

* permissions: update channel permission handling

* permissions: update guild permission handling

* permissions: update member permission handling

* permissions: update message permission handling

* permissions: update webhook permission handling

* fix this buggg

* fix: typo

* better func names

* better description

* permissions(editMember): add permission check if channel_id is provided

* added todo for deaf

* fixxx

* FIIIXXX

* Update permissions.ts

* throwOn to require

* change up review things

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Apply suggestions from code review

Co-authored-by: Ayyan <ayyantee@gmail.com>

* BigInt() to n

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>

* Update src/util/permissions.ts

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

* missed this

* Update permissions.ts

* here enum is needed

* use set so errors arenn't strange

* dumb idea

* hasChannelPermissions functions are nice to have

* role to guild

* bugg

* fix(handlers): createGuildChannel check overwrite perms

* remove redundant if check

* fixes

* Update guild.ts

* bettrrrr

* Revert "bettrrrr"

This reverts commit ecbd30e160.

* I hate it

* fix fix

* fixxesss

* this function is better

* oh forgot these

* better I guess

* more functions

* silly me forgot to remove console.logs

* buuuuugs

* small changes

* Update permission.ts

* Update permissions.ts

* Update GUILD_CREATE.ts

* Update channel.ts

* remove this

* suggestions

Co-authored-by: Ayyan <ayyantee@gmail.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2021-03-11 22:33:52 +04:00
ayntee 8654aeded5 refactor: rename controllers to handlers and handlers to helpers (#660)
* refactor: rename controllers to handlers and handlers to helpers

* fmt
2021-03-11 21:41:03 +04:00