if config.json dosent exist, throw error saying they need config.json
This commit is contained in:
parent
2cf6b30a78
commit
38fa060507
1 changed files with 4 additions and 0 deletions
4
index.js
4
index.js
|
@ -1,3 +1,7 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
if (!fs.existsSync('./config.json')) {
|
||||||
|
throw new Error('I could not find config.json, are you sure you have it?');
|
||||||
|
}
|
||||||
const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo');
|
const { AkairoClient, CommandHandler, InhibitorHandler, ListenerHandler } = require('discord-akairo');
|
||||||
const { token, prefix, ownerID } = require('./config.json');
|
const { token, prefix, ownerID } = require('./config.json');
|
||||||
require('console-stamp')(console, '[HH:MM:ss]');
|
require('console-stamp')(console, '[HH:MM:ss]');
|
||||||
|
|
Loading…
Reference in a new issue