mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user