This commit is contained in:
ledlamp 2018-05-11 23:32:40 -07:00
parent c1531fe76e
commit e885919be3
6 changed files with 28 additions and 66 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
/local/
/src/config.json
node_modules/

View File

@ -1,2 +1 @@
/src/
/local/

View File

@ -5,9 +5,6 @@
"puppeteer": "^0.13.0",
"ws": "^3.3.2",
"mongodb": "^3.0.0-rc0",
"decompress": "^4.2.0",
"async-exit-hook": "^2.0.1",
"socket.io-client": "^2.0.4",
"striptags": "~3.1.1"
"async-exit-hook": "^2.0.1"
}
}

25
src/config.js Normal file
View File

@ -0,0 +1,25 @@
module.exports = {
"testmode": false,
"token": process.env.DISCORD_TOKEN,
"webhooks": {
"console": process.env.TOKEN_WEBHOOK_CONSOLE,
"welcome": process.env.TOKEN_WEBHOOK_WELCOME,
},
"opID": "281134216115257344",
"guildID": "321819041348190249",
"channels": {
"main": "321819041348190249"
},
"mppname": "[discord.gg/k44Eqha]",
"disabledRooms": [
"RP Room",
"Legends of Alorgon {RP Room}",
"Legends of Alorgon",
"Breastmilk ♥ 7:45 AM"
]
}

View File

@ -1,7 +1,7 @@
global.exitHook = require('async-exit-hook');
global.Discord = require('discord.js');
global.fs = require('fs');
global.config = require('./config.json');
global.config = require('./config');
global.dClient = new Discord.Client({ disableEveryone: true });
console._log = console.log;
@ -35,7 +35,7 @@ process.on('uncaughtException', error => {
(require('mongodb').MongoClient).connect(process.env.MONGODB_URI).then(client=>{
global.mdbClient = client;
dClient.login(config.testmode ? config.test_token : config.token);
dClient.login(config.token);
});
dClient.once('ready', () => {
@ -47,9 +47,6 @@ dClient.once('ready', () => {
require('./screenshotter.js');
require('./misc.js');
// backup
dClient.channels.get('394962139644690432').send(new Discord.MessageAttachment(global['files.zip'], 'files.zip'));
delete global['files.zip'];
});
dClient.on('error', console.error);
dClient.on('warn', console.warn);

55
src/package-lock.json generated
View File

@ -1,55 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"discord.js": {
"version": "github:hydrabolt/discord.js#b186472785db6bbe7de37e1a75104d79dd0cc44f",
"requires": {
"pako": "1.0.6",
"prism-media": "0.2.1",
"snekfetch": "3.6.4",
"tweetnacl": "1.0.0",
"ws": "4.1.0"
}
},
"pako": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz",
"integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg=="
},
"prism-media": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.2.1.tgz",
"integrity": "sha512-Kfp1+6gzjY6X8mqKHa6D3brX+BtMUPFwzAkz4zgtVPgbkA2XxhITROdfQXVurU4fuJsylFRwqo7ciQlQCm9hAw=="
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"snekfetch": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
"integrity": "sha512-NjxjITIj04Ffqid5lqr7XdgwM7X61c/Dns073Ly170bPQHLm6jkmelye/eglS++1nfTWktpP6Y2bFXjdPlQqdw=="
},
"tweetnacl": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.0.tgz",
"integrity": "sha1-cT2LgY2kIGh0C/aDhtBHnmb8ins="
},
"ws": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-4.1.0.tgz",
"integrity": "sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==",
"requires": {
"async-limiter": "1.0.0",
"safe-buffer": "5.1.1"
}
}
}
}