use config param instead of require

This commit is contained in:
Nathaniel Mason 2022-03-29 19:55:44 +01:00
parent 4312a2e075
commit aaae385763
3 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,3 @@
const {build, release} = require('../config.json');
module.exports = {
name: 'info',
@ -43,12 +41,12 @@ module.exports = {
},
{
"name": "Release Type",
"value": release,
"value": config.release,
"inline": true
},
{
"name": "Release Version",
"value": build,
"value": config.build,
"inline": true
},
{

View File

@ -1,5 +1,3 @@
const { token } = require('../config.json');
module.exports = {
name: 'restart',
description: '(Owner Only) Shuts down the bot.',
@ -8,7 +6,7 @@ module.exports = {
await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
try {
client.destroy();
await client.login(token);
await client.login(config.token);
await message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
console.log("All systems go")
} catch(e) {console.log(e);}

View File

@ -1,7 +1,7 @@
module.exports = {
name: "stop",
description: "IT'S TIME TO STOP!... the bot",
async execute(client, message, config) {
async execute(_, message, config) {
if (message.author.id == config.ownerID) {
await message.channel.send({embed: {
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",