changes to client config
parent
708ec88947
commit
e0695fe39c
|
@ -3,7 +3,7 @@ import { promises as fs } from 'fs';
|
||||||
import { Collection, Command, Util } from '.';
|
import { Collection, Command, Util } from '.';
|
||||||
|
|
||||||
export default class Client extends eris.Client {
|
export default class Client extends eris.Client {
|
||||||
public config: { token: string, prefix: string };
|
public config: { token: string, prefix: string, guildID: string };
|
||||||
|
|
||||||
public commands: Collection<Command>;
|
public commands: Collection<Command>;
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ import { Client } from './class';
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
const read = await fs.readFile('../config.yaml', 'utf8');
|
const read = await fs.readFile('../config.yaml', 'utf8');
|
||||||
const config: { token: string, prefix: string } = parse(read);
|
const config: { token: string, prefix: string, guildID: string } = parse(read);
|
||||||
const client = new Client(config.token);
|
const client = new Client(config.token, { defaultImageFormat: 'png' });
|
||||||
client.config = config;
|
client.config = config;
|
||||||
client.loadPlugins();
|
client.loadPlugins();
|
||||||
await client.loadEvents();
|
await client.loadEvents();
|
||||||
|
|
Loading…
Reference in New Issue