mirror of
https://github.com/HirziDevs/PteroStats
synced 2026-01-09 15:44:01 +00:00
v1.4.0
This commit is contained in:
28
index.js
28
index.js
@@ -1,32 +1,10 @@
|
||||
const { Client, Collection, MessageEmbed } = require('discord.js')
|
||||
const { Client, Collection } = require('discord.js')
|
||||
const fs = require('fs')
|
||||
const client = new Client()
|
||||
const yaml = require('js-yaml')
|
||||
const config = yaml.load(fs.readFileSync('./config.yml', 'utf8'))
|
||||
client.config = config
|
||||
|
||||
let nodelist = [
|
||||
{
|
||||
id: 'Server ID',
|
||||
name: 'Example Server 1',
|
||||
nameid: 'Node1',
|
||||
nodeid: '1'
|
||||
},
|
||||
{
|
||||
id: 'Server ID',
|
||||
name: 'Example Server 2',
|
||||
nameid: 'Node2',
|
||||
nodeid: '2'
|
||||
},
|
||||
//Add more code like bellow to the nodeslist array after comma and before ']' if you want to add more nodes
|
||||
//{
|
||||
// id: 'Server ID',
|
||||
// name: 'Example Server 3',
|
||||
// nameid: 'Node3',
|
||||
// nodeid: '1'
|
||||
//},
|
||||
]
|
||||
client.nodelist = nodelist
|
||||
client.nodelist = require('./nodes.js')
|
||||
|
||||
fs.readdir('./events/', (err, files) => {
|
||||
if (err) return console.error(err)
|
||||
@@ -37,5 +15,5 @@ fs.readdir('./events/', (err, files) => {
|
||||
})
|
||||
})
|
||||
|
||||
if (config.token === 'BOT TOKEN') console.log(chalk.blue('[PteroStats Checker] ') + chalk.red('Invalid Token, Check ') + chalk.green('config.json') + chalk.red(' file to change token'))
|
||||
if (config.token === 'BOT TOKEN') console.log(chalk.blue('[PteroStats Checker] ') + chalk.red('Invalid Token, Check ') + chalk.green('config.yml') + chalk.red(' file to change token'))
|
||||
client.login(config.token)
|
||||
|
||||
Reference in New Issue
Block a user