if recordings directory
This commit is contained in:
parent
bc519f4741
commit
d1114afeab
7
index.js
7
index.js
|
@ -1,6 +1,8 @@
|
|||
const Discord = require('discord.js');
|
||||
const client = new Discord.Client();
|
||||
|
||||
const fs = require("fs");
|
||||
|
||||
const config = require('./config.json');
|
||||
const commands = require(`./bin/commands`);
|
||||
|
||||
|
@ -11,6 +13,11 @@ if(!config.PREFIX || !config.BOT_TOKEN) {
|
|||
process.exit(1);
|
||||
}
|
||||
|
||||
//create the recordings directory in case people forget to do so
|
||||
try {
|
||||
fs.mkdirSync("./recordings/");
|
||||
} catch(ignored) {}
|
||||
|
||||
client.on('message', msg => {
|
||||
if (msg.content.startsWith(config.PREFIX)) {
|
||||
const commandBody = msg.content.substring(config.PREFIX.length).split(' ');
|
||||
|
|
Loading…
Reference in a new issue