use config param instead of require
This commit is contained in:
parent
4312a2e075
commit
aaae385763
|
@ -1,5 +1,3 @@
|
||||||
const {build, release} = require('../config.json');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: 'info',
|
name: 'info',
|
||||||
|
@ -43,12 +41,12 @@ module.exports = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Release Type",
|
"name": "Release Type",
|
||||||
"value": release,
|
"value": config.release,
|
||||||
"inline": true
|
"inline": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Release Version",
|
"name": "Release Version",
|
||||||
"value": build,
|
"value": config.build,
|
||||||
"inline": true
|
"inline": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
const { token } = require('../config.json');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'restart',
|
name: 'restart',
|
||||||
description: '(Owner Only) Shuts down the bot.',
|
description: '(Owner Only) Shuts down the bot.',
|
||||||
|
@ -8,7 +6,7 @@ module.exports = {
|
||||||
await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
|
await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
|
||||||
try {
|
try {
|
||||||
client.destroy();
|
client.destroy();
|
||||||
await client.login(token);
|
await client.login(config.token);
|
||||||
await message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
|
await message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
|
||||||
console.log("All systems go")
|
console.log("All systems go")
|
||||||
} catch(e) {console.log(e);}
|
} catch(e) {console.log(e);}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "stop",
|
name: "stop",
|
||||||
description: "IT'S TIME TO STOP!... the bot",
|
description: "IT'S TIME TO STOP!... the bot",
|
||||||
async execute(client, message, config) {
|
async execute(_, message, config) {
|
||||||
if (message.author.id == config.ownerID) {
|
if (message.author.id == config.ownerID) {
|
||||||
await message.channel.send({embed: {
|
await message.channel.send({embed: {
|
||||||
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
|
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
|
||||||
|
|
Reference in New Issue