Commit Graph

37 Commits

Author SHA1 Message Date
ayntee
79089d239b fix(util/permissions): include guild ID while resolving bits (#481)
Closes #480
2021-01-28 13:58:24 +04:00
Ayyan
6599636dbc feat(handlers): add Membership Screening (#449)
* feat(handlers): support membership screening feature

* s
2021-01-26 19:20:06 +04:00
ayntee
683900236f Remove tests 2021-01-26 13:16:53 +04:00
ITOH
95a2b7a74d feat(util): add camelToSnakeCase() & snakeToCamelCase() (#473)
* Update utils.ts

* add tests

* Update utils.test.ts

* void unnecessary

* Apply suggestions from code review

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

* Update src/util/utils.ts

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

* Update utils.ts

* remove object test

* some name changes

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-26 12:44:25 +04:00
Ayyan
17959bc1c8 Revert "feat(util): add camelToSnakeCase() & snakeToCamelCase() (#463)" (#469)
This reverts commit 08d685743a.
2021-01-26 10:51:36 +04:00
ITOH
08d685743a feat(util): add camelToSnakeCase() & snakeToCamelCase() (#463)
* Update utils.ts

* add tests

* Update utils.test.ts

* void unnecessary

* Apply suggestions from code review

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

* Update src/util/utils.ts

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

* Update utils.ts

* remove object test

* some name changes

Co-authored-by: Ayyan <ayyantee@gmail.com>
2021-01-26 10:45:30 +04:00
ITOH
ce33790d97 fix(util): use custom cache instead of default cache (#461)
* Update permissions.ts

* fixe that
2021-01-25 17:24:33 +04:00
ayntee
e455ba1655 Revert "refactor(util): use getter instead (#432)"
This reverts commit 8d5803c82a.
2021-01-25 15:09:02 +04:00
ITOH
51387c5705 refactor(util): COMMANDS_GUILD_ID constant arg order (#440)
* fmt

* refactor(util): change arg order for COMMANDS_GUILD_ID

* refactor(handlers): change arg order for COMMANDS_GUILD_ID

* feat(handlers): add getSlashCommand function

* Update mod.ts

* remove that
2021-01-24 15:12:40 +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
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
f70a989a21 types: better types (#413)
* Update cache.ts

* Update shard_manager.ts
2021-01-23 23:15:11 +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
Ayyan
8d5803c82a refactor(util): use getter instead (#432) 2021-01-21 22:47:46 +04:00
ITOH
3c93237976 refactor(util): remove GUILD_INTEGRATION_CREATE endpoint (#430) 2021-01-21 21:23:02 +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
Skillz
be98dcbfa5 fix default avatars 2021-01-14 12:21:46 -05:00
Ayyan
27fb44128f refactor: replace "return await" (#354) 2021-01-09 21:48:02 +04:00
Ayyan
e5a8f3b358 chore: setup "deno lint" (#331)
* chore: setup "deno lint"

* ci(lint): add --unstable flat to lint script

* lint

* lint

* refactor: destructure assignment for Message#guildID

* chore: remove TODO comment

* refactor: remove redundant async

* chore: switch to Deno stable vscode ext

* chore: remove ignore comments

* chore: remove ignore comments

* chore: remove @ts-ignore comment

* fixes

* fixes

* chore: remove deno-lint-ignore comment

* chore: add index signature
2021-01-03 20:12:42 +04:00
ayntee
32c3306bf0 fix: outdated pin & unpin handlers and endpoints 2021-01-02 17:10:18 +04:00
TriForMine
d53725d069 fix: use correct bitwise operator (#302)
* Fix permissions (sorry my ide changed & to &&)

* Change botHasChannelPermissions to async.
This seems to have fixed my issue for my bot

* Remove async for botHasChannelPermissions

* Add async back for botHasChannelPermissions since it doesn't work without it

* Remove async, the issues were something else apparently
2020-12-30 17:35:39 +04:00
TriForMine
484f86638f refactor: resolve async promises, fixed typos, and used inline variable for return (#299)
* Added await in async function, fixed typos and used inline variable for return

* Added await in async function, fixed typos and used inline variable for return

* Revert "Added await in async function, fixed typos and used inline variable for return"

This reverts commit f31caf5d

* Added await in async function, fixed typos and used inline variable for return

* Fixes format

* Fixes format 2

* Fixes format 4475757

* Fixes format 878757854786312378657865785785785785

* Change return to await

* Fixing more issues

* Fixing even more issues

* Fixing even more issues +

* Fixes format
2020-12-30 12:31:11 +04:00
ITOH
abee2e2dee fix: hasChannelPermissions() to use memberIDHasPermission() (#279) 2020-12-27 19:46:11 +04:00
TriForMine
d5c19e50f0 fix: remove extra slash from IMAGE_BASE_URL (#274)
Removed the extra slash at the end since the usage of this variable always add the slash after the constant.
2020-12-27 14:33:37 +04:00
Skillz
189dc150f2 rename to mod.ts 2020-12-26 19:30:32 -05:00
Skillz4Killz
af156b6b25 Merge pull request #262 from discordeno/getters
feat: implement getters
2020-12-26 18:37:55 -05:00
Skillz4Killz
4f12969cd8 fmt 2020-12-26 23:35:58 +00:00
ayntee
2c697a4d2d refactor: add gateway version to constants 2020-12-26 20:01:41 +04:00
ayntee
d793a46497 Merge branch 'next' of https://github.com/discordeno/discordeno into getters 2020-12-26 19:46:17 +04:00
ayntee
64884439db refactor(rest): move user agent to constants 2020-12-26 19:36:08 +04:00
ayntee
8e3fab7411 fix: remove util/cdn export 2020-12-24 17:59:15 +04:00
ayntee
fe43cc8f88 Some updates―renaming interfaces and files 2020-12-23 18:12:12 +04:00
ayntee
321175a72f Revert "chore: verbose imports"
This reverts commit dfe6f371d3.
2020-12-23 11:03:06 +04:00
ayntee
dfe6f371d3 chore: verbose imports 2020-12-22 22:59:09 +04:00
ayntee
7d183b9bef Merge branch 'next' of https://github.com/discordeno/discordeno into getters 2020-12-22 22:06:41 +04:00
Skillz4Killz
19f228c329 feat: slash commands and interactions (#248)
* start slash commands

* lil bit of this

* a little bit of that

* chore: add slash commands' types  (#249)

* Add slash Types

* style: format source files

* interaction create event

* make it a valid controller

* respond to a slash command

* interactions

* shtuff

* gotta get them all

* you gotta hit the bullseye

* you gotta survive

* most important thing i forgot

* please keep this

* more shuttttfgvuasdafwesdvjzdk

* more endpoints

* TYPO

* making that party jam

* this is my jam

* refactor: move slash commands types to webhook.ts (#250)

* Move Types

* Move to webhook.ts types file

* Update webhook.ts

* fix: update ExecuteSlashCommandOptions (#252)

* Move Types

* idk

* Remove Unnecessary Comment

* details

* http side of slash

* Format

* idk

* cleanup

* fmt

* fix imports

* tet

* remove log

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* Use tweetnacl_deno for verification

* chore: move tweetnacl import to deps.ts

* Update deps.ts

* deps: use tweetnacl from GitHub

* fix: use serverOptions.slashHexKey

* fix: res -> req

* fix: use TextEncoder

* deps: add std@0.81.0/encoding/hex.ts

* chore: use encode() from std/encoding/hex.ts

* I am using the GitHub online editor pls help

* Update deps.ts

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* Update interactions.ts

* fix: respond with 400 if timestamp and signature not present

* style: format files

* refactor!: merge createServer() into startServer()

* style: format files

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
Co-authored-by: ayntee <ayyantee@gmail.com>
2020-12-22 21:39:01 +04:00
Ayyan
e49a23687e refactor!: organize directories and files (#268)
* refactor!: organize directory structure

* fix: avoid stack overflow err

* chore: swtch back to std/encoding for base64

* style: format source files
2020-12-22 21:26:27 +04:00