Merge pull request #48 from DerpyForks/master

Error if Node is not v12 or higher, fix eslint error etc
This commit is contained in:
Isaac 2020-10-14 17:42:30 +01:00 committed by GitHub
commit 2dab2426d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -43,14 +43,13 @@ module.exports = {
.setColor(config.err_colour)
.setAuthor(message.author.username, message.author.displayAvatarURL())
.setTitle(':x: **No permission**')
.setDescription(`You don't have permission to rename this channel as you are not staff.`)
.setDescription('You don\'t have permission to rename this channel as you are not staff.')
.addField('Usage', `\`${config.prefix}${this.name} ${this.usage}\`\n`)
.addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`)
.setFooter(guild.name, guild.iconURL())
);
let newname = args.join(' ');
message.channel.setName(newname);
message.channel.setName(args.join(' ')); // new channel name
message.channel.send(
new MessageEmbed()

View File

@ -11,6 +11,9 @@
*
*/
const version = Number(process.version.split('.')[0].replace('v', ''));
if (!version === 12 || !version > 12) return console.log('Please upgrade to Node v12 or higher');
const fs = require('fs');
const path = require('path');