TimboKZ / discord-spoiler-bot

🗣️🛑 Spoiler support for Discord
https://www.npmjs.com/package/discord-spoiler-bot
MIT License
61 stars 19 forks source link

Bot won't start on Ubuntu 16.10 64 bit #9

Closed SpooseMareen closed 7 years ago

SpooseMareen commented 7 years ago

Trying to host this via Digital Ocean but I keep getting this error whenever I try to start the bot:

root@Discord:~#`` node index.js /root/node_modules/discord-spoiler-bot/index.js:9 let bot = new SpoilerBot(config); ^

TypeError: SpoilerBot is not a constructor at Object. (/root/node_modules/discord-spoiler-bot/index.js:9:11) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (/root/index.js:3:20) at Module._compile `(module.js:570:32)

I've got node at v6.10.0 but I've tried other versions and nothing seems to fix it.

vegeta897 commented 7 years ago

Could you post the rest of your index.js?

SpooseMareen commented 7 years ago

I'm just using the example .js so:

'use strict';

const SpoilerBot = require('discord-spoiler-bot');

let config = { token: 'you_secret_token_here', };

let bot = new SpoilerBot(config); bot.connect();

I've got the bot's token in 'you_secret_token_here'.

SpooseMareen commented 7 years ago

I followed some of the suggestions on another issue posted, and it seems to work fine after reinstalling the bot in a different directory along with running "npm init" in said directory.