Commit Graph

1256 Commits

Author SHA1 Message Date
ITOH
ff1bfb4568 Merge pull request #5 from discordeno/master
sync master
2021-01-23 20:46:43 +01:00
ITOH
8d8c792747 feat(handlers): add getInvite() & deleteInvite() (#421)
* feat(handlers): add getInvite

* feat(handlers): add deleteInvite

* remove deving things

* add jsdoc

* move functions up

* import got deleted

* feat(handlers): invite better types

* throw enum error

* remove unnecessary checks

* Update mod.ts

* channel exists since botHasChannelPermissions did not throw any error
2021-01-23 23:33:12 +04:00
ITOH
c281665961 fix: use applicationID for slash commands instead of botID (#437)
* add(bot): ApplicationID let & setApplicationID function

* fix(controllers): set application id when bot is ready

* refactor(util): rename botID argument to applicationID

* fix(handlers): use applicationID
2021-01-23 23:19:12 +04:00
ITOH
55235e5ea0 feat(handlers): add getTemplate() (#422)
* feat(handlers): getTemplate

* update jsdoc

* redirect this function

* remove getGuildTemplate

* Update src/api/handlers/guild.ts

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

* remove breaking change

* save in const

* Update src/api/handlers/guild.ts

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

* Update src/api/handlers/guild.ts

* Update src/api/handlers/guild.ts

* Update mod.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2021-01-23 23:17:50 +04:00
ITOH
f6f435bb1f feat(handlers): add getAvailableVoiceRegions() (#425)
* add voice endpoint

* feat(handlers): add getVoiceRegions

* Update mod.ts

* remove breaking changes
2021-01-23 23:17:11 +04:00
ITOH
26f8321ee9 feat(ws): add additional info to wsError debug event (#434)
* feat(ws): better error debug message

* Update src/ws/shard.ts

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

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-23 23:16:04 +04:00
ITOH
f70a989a21 types: better types (#413)
* Update cache.ts

* Update shard_manager.ts
2021-01-23 23:15:11 +04:00
ITOH
76e0395319 fix(handlers): add missing handlers (#436) 2021-01-23 23:13:06 +04:00
ITOH
8beb036741 feat(handlers): add getGatewayBot() & getApplicationInformation() (#428)
* feat(handlers): add getGatewayBot()

* refactor(bot): use getGatewayBot() to get gateway data

* feat(handlers): add getApplicationInformation

* add(handlers): getApplicationInformation jsdoc

* Add oauth required types

* create separate file

* delete misc

* OAuthApplication

* forgot to update import

* idk why that was here
2021-01-23 14:51:35 +04:00
ITOH
62af388820 fix(controllers): update cache with new value in gateway events (#433)
* fix(controllers): cache updated member

* fix(controllers): cache update guild

* fix(controllers): cache user update

* fix(controllers): cache voice state update

* refactor(controllers): message reaction add remove previousReactions

* refactor(controllers): message reaction remove remove previousReactions

* fix(controllers): cache message reaction remove all

* fix(controllers): cache message reaction remove emoji

* fix(controllers): cache guild role create

* fix(controllers): role delete event update cache and return eventHandler

* fix(controllers): cache role update

* don't return eventHandlers

* don't return eventHandlers
2021-01-22 19:20:33 +04:00
Ayyan
8d5803c82a refactor(util): use getter instead (#432) 2021-01-21 22:47:46 +04:00
ayntee
8fc6089386 refactor: remove index signatures 2021-01-21 22:34:26 +04:00
Ayyan
14ca3e1267 refactor: remove index signatures (#431) 2021-01-21 22:20:53 +04:00
ITOH
61f2e1592b fix(controllers): cache updated message on MESSAGE_UPDATE (#429)
* fix(controllers): cache message on update event

* forgot to paste that in
2021-01-21 22:05:32 +04:00
ITOH
3c93237976 refactor(util): remove GUILD_INTEGRATION_CREATE endpoint (#430) 2021-01-21 21:23:02 +04:00
ITOH
e62b52d160 feat(handlers): check for message max delete days (#416)
* check prune max days

* patch(handlers): max days is 30

* change in description too

* fix: merge problems
10.1.0
2021-01-21 10:57:05 +04:00
ayntee
19c7e3b4e0 ci(test): add fmt check script 2021-01-20 23:29:59 +04:00
ayntee
92719a1a8c ci(lint): add fmt check step 2021-01-20 22:20:36 +04:00
ITOH
fb409b71b6 fix(controllers): check if the cached content is same as the updated content (#426) 2021-01-20 21:52:47 +04:00
ayntee
251256d1ae Merge branch 'master' of https://github.com/discordeno/discordeno 2021-01-20 17:20:37 +04:00
ayntee
b3f9287183 style: format files 2021-01-20 17:02:01 +04:00
ITOH
16fab1b925 feat(handlers): add editBotNickname() (#415)
* feat(handlers): add editBotNickname

* return a var

* Update member.ts

* Update src/api/handlers/member.ts

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

* Update member.ts

* Update member.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-20 15:31:48 +04:00
ITOH
11b68981f9 feat(handlers): add getGuildPreview() (#408)
* add(handlers): getGuildPreview

* update comment

* check if guild is discoverable

* remove checking since getGuild does not work on unjoined guilds
2021-01-20 14:22:04 +04:00
ayntee
7f67b45a09 Revert "chore: update exports (#402)"
This reverts commit 442350b63e.
2021-01-20 13:51:44 +04:00
ITOH
4ee701b159 feat(handlers): add startTyping() (#404)
* feat(handlers): triggerTypingIndicator function

* add period

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

* startTyping is better

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

Co-authored-by: Ayyan <ayyantee@gmail.com>
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2021-01-20 13:47:37 +04:00
ITOH
874f1ee979 feat(handlers): add getEmoji() & getEmojis() (#406)
* add(handlers): getEmojis

* add(handlers): getEmoji

* fix cache

* addToCache argument

* addtocache default to true

* Update guild.ts

* remove this

* Update src/api/handlers/guild.ts

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

* Update src/api/handlers/guild.ts

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

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-20 13:46:35 +04:00
ITOH
26368ef8e0 feat(controllers): cache updated guild object with new emojis (#414) 2021-01-20 13:45:42 +04:00
ITOH
2cc513b874 feat(handlers): add editChannelOverwrite() & deleteChannelOverwrite() (#403)
* add editChannelOverwrite function

* remove body constant

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

* format

* Update src/api/handlers/guild.ts

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

* Update src/api/handlers/guild.ts

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

* add deleteChannelOverwrite function

* Mark permission in jsdoc

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

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-20 13:43:35 +04:00
ITOH
7db3f65cbd feat(handlers): add kickFromVoiceChannel() function (#407) 2021-01-20 13:21:13 +04:00
Ayyan
442350b63e chore: update exports (#402) 2021-01-19 19:22:03 +04:00
ITOH
727a60551a feat(handlers): inhibitors for deleteChannel() (#401)
* better deleteChannel function

* throw error if guild wasn't found

* remove dm close ability

* change this comment again

* guildID should be first
2021-01-19 18:20:12 +04:00
Ayyan
4c9171e72a fix(handlers): support for custom emoji in reaction remove functions (#400) 2021-01-19 18:10:28 +04:00
ITOH
e56d67a138 feat: internal intents resolution (#390)
* better intents typing

* Update README.md

* Update mod.test.ts

* support enum too
2021-01-19 12:18:13 +04:00
ITOH
8b663ca4de refactor(util): update endpoints (#383)
* Update constants.ts

* fiiiixxxx

* dupe

* Update src/util/constants.ts

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

* USER_DM

* fix this and remove that

* Update src/util/constants.ts

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

* Update constants.ts

* Update src/util/constants.ts

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

* Update src/util/constants.ts

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

* need these

* hmm

* rename GUILD_EMBED to GUILD_WIDGET

* idk

* Update src/util/constants.ts

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

* Update constants.ts

* Update constants.ts

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-17 20:34:34 +04:00
Ayyan
b4cfeb7fbd Update README.md 2021-01-16 18:52:03 +04:00
Ayyan
e898d6d46d docs: improve wording (#363)
* docs: improve wording

* Thanks to Skillz <3

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

Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
2021-01-16 18:51:44 +04:00
Skillz4Killz
f665ba4434 Merge pull request #393 from discordeno/optional-dimensions
types(message): make attachment dimensions optional
2021-01-15 15:35:11 -05:00
Skillz4Killz
ad1d8e636d Merge pull request #394 from discordeno/new-message-types
types(message): add 16 & 17 to MessageTypes
2021-01-15 15:34:46 -05:00
ayntee
292aa470ed types(message): add 16 & 17 to MessageTypes 2021-01-15 23:22:58 +04:00
ayntee
7d28b550c9 types(message): make attachment dimensions optional
Reference: https://github.com/discord/discord-api-docs/pull/2214
2021-01-15 23:07:15 +04:00
Ayyan
ae99819c22 ci: run workflow on push to master (#391) 2021-01-15 21:20:42 +04:00
ayntee
e69d4ac78b ci: another attempt to fix CI 2021-01-15 19:46:05 +04:00
Ayyan
5973807e32 docs: add jsdoc comments for event handlers (#376) 2021-01-15 16:48:54 +04:00
Ayyan
30da6a750d test(message): add missing tests (#371)
* test(message): add missing tests

* Add todo comment
2021-01-15 16:47:19 +04:00
ayntee
5307f0c5f2 Revert "test: attempt to fix "Token not provided" error (#384)"
This reverts commit 6f21de2a3a.
2021-01-15 15:21:41 +04:00
Ayyan
6f21de2a3a test: attempt to fix "Token not provided" error (#384)
* test: fix "Token not provided" error

* idk wtf

* Revert "idk wtf"

This reverts commit 26063aa127.

* https://open.spotify.com/track/3ZWc3Bm8eUMRRJhSWKHHeV 🔥🔥
2021-01-15 15:03:54 +04:00
Skillz
d921d98931 test fix 2021-01-14 14:09:55 -05:00
Skillz
a852624415 remove extra log 2021-01-14 12:47:52 -05:00
Skillz
50f47fece6 test use depth 10 for error 2021-01-14 12:25:52 -05:00
Skillz
2a935d5974 Merge branch 'master' of https://github.com/discordeno/discordeno 2021-01-14 12:22:00 -05:00