mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Merge pull request #48 from DerpyForks/master
Error if Node is not v12 or higher, fix eslint error etc
This commit is contained in:
commit
2dab2426d3
@ -43,14 +43,13 @@ module.exports = {
|
|||||||
.setColor(config.err_colour)
|
.setColor(config.err_colour)
|
||||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
.setTitle(':x: **No permission**')
|
.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('Usage', `\`${config.prefix}${this.name} ${this.usage}\`\n`)
|
||||||
.addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`)
|
.addField('Help', `Type \`${config.prefix}help ${this.name}\` for more information`)
|
||||||
.setFooter(guild.name, guild.iconURL())
|
.setFooter(guild.name, guild.iconURL())
|
||||||
);
|
);
|
||||||
|
|
||||||
let newname = args.join(' ');
|
message.channel.setName(args.join(' ')); // new channel name
|
||||||
message.channel.setName(newname);
|
|
||||||
|
|
||||||
message.channel.send(
|
message.channel.send(
|
||||||
new MessageEmbed()
|
new MessageEmbed()
|
||||||
|
@ -11,12 +11,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
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 fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
let dev = fs.existsSync('user/dev.env') && fs.existsSync('user/dev.config.js');
|
let dev = fs.existsSync('user/dev.env') && fs.existsSync('user/dev.config.js');
|
||||||
|
|
||||||
require('dotenv').config({path: path.join('user/', dev ? 'dev.env' : '.env')});
|
require('dotenv').config({ path: path.join('user/', dev ? 'dev.env' : '.env') });
|
||||||
|
|
||||||
module.exports.config = dev ? 'dev.config.js' : 'config.js';
|
module.exports.config = dev ? 'dev.config.js' : 'config.js';
|
||||||
const config = require(path.join('../user/', module.exports.config));
|
const config = require(path.join('../user/', module.exports.config));
|
||||||
|
Loading…
Reference in New Issue
Block a user