This commit is contained in:
Skillz4Killz
2023-04-13 22:40:09 +00:00
6 changed files with 4 additions and 11 deletions
-1
View File
@@ -4,7 +4,6 @@
"node:fs": "https://deno.land/std@0.176.0/node/fs.ts",
"node:events": "https://deno.land/std@0.176.0/node/events.ts",
"tweetnacl": "npm:tweetnacl",
"node-fetch": "npm:node-fetch",
"ws": "npm:ws",
"mocha": "https://deno.land/std@0.168.0/testing/bdd.ts",
"chai": "https://cdn.skypack.dev/chai@4.3.4?dts",
+1 -2
View File
@@ -26,8 +26,7 @@
"dependencies": {
"@discordeno/types": "19.0.0-alpha.1",
"@discordeno/utils": "19.0.0-alpha.1",
"dotenv": "^16.0.3",
"node-fetch": "^3.3.1"
"dotenv": "^16.0.3"
},
"devDependencies": {
"@swc/cli": "^0.1.62",
+2 -3
View File
@@ -2,7 +2,6 @@
/* eslint-disable no-const-assign */
import { InteractionResponseTypes } from '@discordeno/types'
import { calculateBits, camelize, camelToSnakeCase, delay, getBotIdFromToken, logger, processReactionString, urlToBase64 } from '@discordeno/utils'
import fetch from 'node-fetch'
import { createInvalidRequestBucket } from './invalidBucket.js'
import { Queue } from './queue.js'
@@ -48,8 +47,8 @@ import type {
MfaLevels,
ModifyGuildTemplate,
} from '@discordeno/types'
import type { CreateRequestBodyOptions, CreateRestManagerOptions, RestManager, SendRequestOptions } from './types.js'
import { createRoutes } from './routes.js'
import type { CreateRequestBodyOptions, CreateRestManagerOptions, RestManager, SendRequestOptions } from './types.js'
// TODO: make dynamic based on package.json file
const version = '19.0.0-alpha.1'
@@ -417,7 +416,7 @@ export function createRestManager(options: CreateRestManagerOptions): RestManage
throw new Error(JSON.stringify(err))
}
return result.status !== 204 ? ((await result.json()) as any) : undefined
return result.status !== 204 ? await result.json() : undefined
}
// eslint-disable-next-line no-async-promise-executor
-1
View File
@@ -24,7 +24,6 @@
},
"dependencies": {
"@discordeno/types": "19.0.0-alpha.1",
"node-fetch": "^3.3.1",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
-1
View File
@@ -1,4 +1,3 @@
import fetch from 'node-fetch'
import { encode } from './base64.js'
/** Converts a url to base 64. Useful for example, uploading/creating server emojis. */
-2
View File
@@ -117,7 +117,6 @@ __metadata:
eslint: ^8.36.0
eslint-config-discordeno: "*"
mocha: ^10.2.0
node-fetch: ^3.3.1
sinon: ^15.0.2
ts-node: ^10.9.1
tsconfig: "*"
@@ -182,7 +181,6 @@ __metadata:
eslint: ^8.36.0
eslint-config-discordeno: "*"
mocha: ^10.2.0
node-fetch: ^3.3.1
sinon: ^15.0.2
ts-node: ^10.9.1
tsconfig: "*"