Auth to discord in cli

This commit is contained in:
Jordan Eldredge 2022-02-20 03:22:33 -05:00
parent 00fef7c7b3
commit af6a5b91eb

View file

@ -27,6 +27,7 @@ import SkinModel from "./data/SkinModel";
import _temp from "temp";
import Shooter from "./shooter";
import { program } from "commander";
import * as config from "./config";
async function withHandler(
cb: (handler: DiscordEventHandler) => Promise<void>
@ -43,6 +44,7 @@ async function withDiscordClient(
cb: (handler: Discord.Client) => Promise<void>
) {
const client = new Discord.Client();
await client.login(config.discordToken);
try {
await cb(client);
} finally {