mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46:26 -08:00
node-fetch conversion
This commit is contained in:
parent
7654801e41
commit
412a117e15
|
@ -1,3 +1,5 @@
|
||||||
|
import fetch, { type RequestInit, type Response, Headers } from "node-fetch"
|
||||||
|
|
||||||
const base = "https://discord.com/api/v10"
|
const base = "https://discord.com/api/v10"
|
||||||
const buckets = new Map<string, DiscordAPIBucket>()
|
const buckets = new Map<string, DiscordAPIBucket>()
|
||||||
const routeConnections = new Map<string, DiscordAPIBucket>()
|
const routeConnections = new Map<string, DiscordAPIBucket>()
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { REST } from "./DiscordRequests"
|
import { REST } from "./DiscordRequests"
|
||||||
import type { APIMessage } from "discord-api-types/v10"
|
import type { APIMessage } from "discord-api-types/v10"
|
||||||
|
import { FormData } from "node-fetch"
|
||||||
|
|
||||||
const EXPIRE_AFTER = 20 * 60 * 1000
|
const EXPIRE_AFTER = 20 * 60 * 1000
|
||||||
const DISCORD_EPOCH = 1420070400000
|
const DISCORD_EPOCH = 1420070400000
|
||||||
|
|
Loading…
Reference in a new issue