mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 00:59:29 +00:00
Auth to discord in cli
This commit is contained in:
parent
00fef7c7b3
commit
af6a5b91eb
1 changed files with 2 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue