UNPKG

@skybloxsystems/ticket-bot

Version:
108 lines (89 loc) 3.09 kB
module.exports = { Start: () => { const axios = require('axios'); console.log('[SkyBlox Systems] - Thank you for using SkyBlox Systems! The bot will run correctly if u have checked the debug.') setTimeout(() => { var config = { method: 'get', url: 'https://registry.npmjs.com/-/v1/search?text=@skybloxsystems/ticket-bot&size=20', headers: { } }; axios(config) .then(function (response) { if (response.data.objects[0].package.version === '1.0.9') { setTimeout(() => { require('./Bot/src/index') }, 1000); } else { setTimeout(() => { console.log(`[SkyBlox Systems] - Please update the NPM package to the latest version. Please run npm i @skybloxsystems/ticket-bot@${response.data.objects[0].package.version}`) }, 1000); } }) .catch(function (error) { console.log(error); }); }, 1000); }, Debug: () => { console.log('[SkyBlox Systems] - Thank you for selecting the debug mode. We will run through checks of the bot to see everything is setup correctly!') const axios = require('axios'); setTimeout(() => { var config = { method: 'get', url: 'https://registry.npmjs.com/-/v1/search?text=@skybloxsystems/ticket-bot&size=20', headers: { } }; axios(config) .then(function (response) { if (response.data.objects[0].package.version === '1.0.9') { setTimeout(() => { require('./debug') }, 1000); } else { setTimeout(() => { console.log(`[SkyBlox Systems] - Please update the NPM package to the latest version. Please run npm i @skybloxsystems/ticket-bot@${response.data.objects[0].package.version}`) }, 1000); } }) .catch(function (error) { console.log(error); }); }, 1000); }, Dev: () => { console.log('[SkyBlox Systems] - Thank you for using SkyBlox Systems! Ticket bot has entered into developer mode.') const axios = require('axios'); setTimeout(() => { var config = { method: 'get', url: 'https://registry.npmjs.com/-/v1/search?text=@skybloxsystems/ticket-bot&size=20', headers: { } }; axios(config) .then(function (response) { if (response.data.objects[0].package.version === '1.0.9') { setTimeout(() => { require('./Bot/src/index') }, 1000); } else { setTimeout(() => { console.log(`[SkyBlox Systems] - Please update the NPM package to the latest version. Please run npm i @skybloxsystems/ticket-bot@${response.data.objects[0].package.version}`) }, 1000); } }) .catch(function (error) { console.log(error); }); }, 1000); }, config: { bot: { prefix: '', token: '', dashboardurl: 'https://localhost', ownerid: '', botClientId: '', } }, }