renesansz / discord-greeter-bot

My greeter bot for Discord
MIT License
49 stars 38 forks source link

I keep getting this error when I type "node bot.js" #202

Closed ghost closed 5 years ago

ghost commented 5 years ago

I get this message no matter what I do. I type "node bot.js" to start it, but this happens and the bot remains offline.

/Users/justpromac/Documents/Discord Bots/PapyrusBot/node_modules/winston-transport/legacy.js:18 throw new Error('Invalid transport, must be an object with a log method.'); ^

Error: Invalid transport, must be an object with a log method. at new LegacyTransportStream (/Users/justpromac/Documents/Discord Bots/PapyrusBot/node_modules/winston-transport/legacy.js:18:11) at DerivedLogger.add (/Users/justpromac/Documents/Discord Bots/PapyrusBot/node_modules/winston/lib/winston/logger.js:345:11) at Object.winston.(anonymous function).args [as add] (/Users/justpromac/Documents/Discord Bots/PapyrusBot/node_modules/winston/lib/winston.js:110:68) at Object. (/Users/justpromac/Documents/Discord Bots/PapyrusBot/bot.js:6:8) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) at Module.load (internal/modules/cjs/loader.js:599:32) at tryModuleLoad (internal/modules/cjs/loader.js:538:12) at Function.Module._load (internal/modules/cjs/loader.js:530:3) at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)

Shareefoo commented 5 years ago

Just change this line: logger.add(logger.transports.Console, {

to this: logger.add(new logger.transports.Console, {

KittenKatten commented 5 years ago

@Shareefoo Hi, I had this problem too, and I've changed it, however, whenever I type node bot.js in now.. screen shot 2019-02-11 at 3 42 44 pm

It just keeps resetting itself. Like it's crashing?

If you could help me, that would be great!

Shareefoo commented 5 years ago

@KittenKatten do you exit from the command or no? because when you run the command, it'll wait for the actions your bot will handle like when you type a message.

NPCtom commented 5 years ago

@KittenKatten do you exit from the command or no? because when you run the command, it'll wait for the actions your bot will handle like when you type a message.

Same issue @Shareefoo.

ghost commented 5 years ago

I just learned Node.js and fully wrote my bot so this isn't an issue for me. Just learn Node.js and don't use premade bots to copy.