discord.io icon indicating copy to clipboard operation
discord.io copied to clipboard

Cannot run any of my bots

Open squalx opened this issue 6 years ago • 8 comments

I've had some bots I've built and some have been running for two years. Today they suddenly stopped working. When I try and run the bots from the terminal nothing happens. I went to check the tokens on the bots on Discord and they all changed. So I tried with the new tokens. Installed the latest Discord.io too, same result.

I don't even see an error. When I do node botName.js It looks like something is running, and then I get the prompt again. Like it fails to connect to Discord, but I get no error message.

I even tried your example code to see if that would work. I've tried multiple tokens from two different accounts. And I've tested on my computer and a remote Ubuntu server where I run my bots. Same result everywhere.

Any ideas?

This code fails to run too. Fails silently that is:

var Discord = require('discord.io');

var bot = new Discord.Client({
    token: "TOKEN_HERE",
    autorun: true
});

bot.on('ready', function() {
    console.log('Logged in as %s - %s\n', bot.username, bot.id);
});

Thanks

squalx avatar Dec 09 '17 02:12 squalx

V5 Gateway is now depreciated You can use npm install woor/discord.io#gateway_v6 to fix your bots

CheweyZ avatar Dec 09 '17 02:12 CheweyZ

Thanks! That did it.

squalx avatar Dec 09 '17 03:12 squalx

Did they silently depreciate V5? I've been looking all over for change logs or some notice but this is the first I'm hearing of it. Thank god I found this Issue on accident because this was driving me nuts.

The output I was getting was "Bot disconnected from Discord with code 4012 for reason: undefined" but Google has no info of a return code 4012 and "undefined" means nothing so Discord really dropped the ball there also.

KuJoe avatar Dec 11 '17 05:12 KuJoe

V5 was announced as being depreciated a while ago its only recently they have actually turned off the gateway for it

CheweyZ avatar Dec 11 '17 20:12 CheweyZ

Do we have any ETA on this being in the main branch? While I can do npm install discord.io

when I try npm install woor/discord.io#gateway_v6

I get the following error log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   'woor/discord.io#gateway_v6' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session d72da826dadc34a8
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for github:woor/discord.io#gateway_v6 Command failed: /usr/bin/git clone --depth=1 -q -b gateway_v6 git://github.com/woor/discord.io.git /home/sds/.npm/_cacache/tmp/git-clone-979101e4
7 silly fetchPackageMetaData /home/sds/.npm/_cacache/tmp/git-clone-979101e4/.git: Permission denied
8 verbose stack Error: Command failed: /usr/bin/git clone --depth=1 -q -b gateway_v6 git://github.com/woor/discord.io.git /home/sds/.npm/_cacache/tmp/git-clone-979101e4
8 verbose stack /home/sds/.npm/_cacache/tmp/git-clone-979101e4/.git: Permission denied
8 verbose stack
8 verbose stack     at ChildProcess.exithandler (child_process.js:275:12)
8 verbose stack     at emitTwo (events.js:126:13)
8 verbose stack     at ChildProcess.emit (events.js:214:7)
8 verbose stack     at maybeClose (internal/child_process.js:925:16)
8 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
9 verbose cwd /var/www/http
10 verbose Linux 4.4.0-103-generic
11 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "woor/discord.io#gateway_v6"
12 verbose node v8.9.3
13 verbose npm  v5.5.1
14 error code 1
15 error Command failed: /usr/bin/git clone --depth=1 -q -b gateway_v6 git://github.com/woor/discord.io.git /home/sds/.npm/_cacache/tmp/git-clone-979101e4
15 error /home/sds/.npm/_cacache/tmp/git-clone-979101e4/.git: Permission denied
16 verbose exit [ 1, true ]

StevenDStanton avatar Dec 18 '17 05:12 StevenDStanton

Was this ever fixed in the main dependency?

krazyito65 avatar Feb 27 '18 20:02 krazyito65

The above issue is about git not being installed however no the main branch still doesn't support gateway v6 so for now it's still the woor branch

CheweyZ avatar Feb 27 '18 20:02 CheweyZ

Thank you for this workaround!

trevorglick avatar Feb 28 '18 05:02 trevorglick