refactor(rest)!: remove falsy token check (#2949)

* refactor(rest): remove falsy token check
This is in favour for interaction only bots, which still need rest but cannot provide a valid bot token.
If you want to use rest for your normal bot it should be your own responsibility to pass a valid token.

Further more `applicationId` is now a required property since we cannot extract the id from the token anymore.

* forgot to commit that

* fix error

* make appid optional again

* app id throw error if undefined

* fix test
This commit is contained in:
ITOH
2023-04-02 21:39:08 +02:00
committed by GitHub
parent 5e1e56146e
commit 7c031df875
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ describe('[rest] manager', () => {
let time: sinon.SinonFakeTimers
beforeEach(() => {
rest = createRestManager({ token: ' ' })
rest = createRestManager({ applicationId: 1n })
time = sinon.useFakeTimers()
})