mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
Merge branch 'main' of https://github.com/discordeno/discordeno
This commit is contained in:
@@ -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",
|
||||
@@ -19,4 +18,4 @@
|
||||
"@discordeno/gateway": "./packages/gateway/dist/index.js",
|
||||
"@discordeno/bot": "./packages/bot/dist/index.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,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
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@discordeno/types": "19.0.0-alpha.1",
|
||||
"node-fetch": "^3.3.1",
|
||||
"tweetnacl": "^1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -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: "*"
|
||||
|
||||
Reference in New Issue
Block a user