This commit is contained in:
Skillz
2020-03-22 14:16:02 -04:00
parent 666684144e
commit d6f0edc112
2 changed files with 8 additions and 15 deletions

21
mod.ts
View File

@@ -3,16 +3,11 @@ import { configs } from "./configs.ts"
import { Intents } from "./types/options.ts"
import { logYellow } from "./utils/logger.ts"
const startup = async () => {
new Client({
token: configs.token,
bot_id: "675412054529540107",
intents: [Intents.GUILDS, Intents.GUILD_MESSAGES],
event_handlers: {
ready: () => logYellow("Bot ready emitted"),
channel_create: channel => console.log(channel.permission_overwrites() || "can;t find")
}
})
}
startup()
new Client({
token: configs.token,
bot_id: "675412054529540107",
intents: [Intents.GUILDS, Intents.GUILD_MESSAGES],
event_handlers: {
ready: () => logYellow("Bot ready emitted")
}
})

View File

@@ -2,7 +2,6 @@ import { RequestMethod } from "../types/fetch.ts"
import { authorization } from "./client.ts"
import { sleep } from "../utils/utils.ts"
// const queue = new Map<string, Queued_Request>()
const ratelimited_paths = new Map<string, Rate_Limited_Path>()
export interface Rate_Limited_Path {
@@ -42,7 +41,6 @@ export const Request_Manager = {
}
const create_request_body = (body: any, method?: RequestMethod) => {
// TODO: REASON should be added as a header if present in the body
return {
headers: {
Authorization: authorization,