Ponjimon / discordcleverbot

A Discord bot using Cleverbot lel
1 stars 0 forks source link

Getting ReferenceError: time not defined #2

Open pforpho opened 8 years ago

pforpho commented 8 years ago
D:\Discord Bot\Cleverbot\node_modules\discord.io\lib\index.js:182
                time = (input.message.length * 0.12) * 1000;
                     ^

ReferenceError: time is not defined
    at DiscordClient.DCP.sendMessage (D:\Discord Bot\Cleverbot\node_modules\disc
ord.io\lib\index.js:182:8)
    at null._onTimeout (D:\Discord Bot\Cleverbot\app.js:163:15)
    at Timer.listOnTimeout (timers.js:92:15)

Any ideas? It should be set up right because when I start it up with

node example/server.js

The bots are loaded and come online in the discord server, it would show them typing and then the error comes, stopping the bots.

pforpho commented 8 years ago

Changed the parameter forceStart to start and it'll get to the

Starting message interval for ___

For all of the bots, but nothing happens.

Mentioning a bot with @, makes the error come up

D:\Discord Bot\Cleverbot\node_modules\discord.io\lib\index.js:182
                time = (input.message.length * 0.12) * 1000;
                     ^

ReferenceError: time is not defined
    at DiscordClient.DCP.sendMessage (D:\Discord Bot\Cleverbot\node_modules\disc
ord.io\lib\index.js:182:8)
    at null._onTimeout (D:\Discord Bot\Cleverbot\app.js:163:15)
    at Timer.listOnTimeout (timers.js:92:15)
pforpho commented 8 years ago

Alright so I started it up again and now it gets to to point where

___ should start...

same error comes up after

So I'm guessing the discord.io\lib\index.js has something wrong with it?

Ponjimon commented 8 years ago

I guess it's because of an outdated discord.io library. I will look into it :)