mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
add token to rest
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { getGatewayBot } from "./helpers/misc/get_gateway_bot.ts";
|
||||
import { rest } from "./rest/rest.ts";
|
||||
import { DiscordGatewayIntents } from "./types/gateway/gateway_intents.ts";
|
||||
import { DiscordGetGatewayBot } from "./types/gateway/get_gateway_bot.ts";
|
||||
import { baseEndpoints, GATEWAY_VERSION } from "./util/constants.ts";
|
||||
@@ -30,6 +31,7 @@ export async function startBot(config: BotConfig) {
|
||||
if (config.eventHandlers) eventHandlers = config.eventHandlers;
|
||||
authorization = `Bot ${config.token}`;
|
||||
ws.identifyPayload.token = `Bot ${config.token}`;
|
||||
rest.token = `Bot ${config.token}`;
|
||||
ws.identifyPayload.intents = config.intents.reduce(
|
||||
(
|
||||
bits,
|
||||
|
||||
@@ -9,6 +9,8 @@ import { processRequestHeaders } from "./process_request_headers.ts";
|
||||
import { runMethod } from "./run_method.ts";
|
||||
|
||||
export const rest = {
|
||||
/** The bot token for this rest client. */
|
||||
token: "",
|
||||
apiVersion: "8",
|
||||
/** The secret authorization key to confirm that this was a request made by you and not a DDOS attack. */
|
||||
authorization: "discordeno_best_lib_ever",
|
||||
|
||||
Reference in New Issue
Block a user