Code Monkey home page Code Monkey logo

Comments (10)

brussell98 avatar brussell98 commented on May 28, 2024

For windows: By default in bot/config.json the is_heroku_version value is set to true. This needs to be changed to false so it will use the login from config instead of environment variables.

As for the unexpected identifier error... Here's what I suspect it is: Using for ... of is a relatively new feature so the version of node you have might not support it. If you are not already, try installing the latest node 5.x.x version and see if that works.

from mirai.

JalinRio42 avatar JalinRio42 commented on May 28, 2024

Okay we are getting somewhere. Updating to node 5.x.x (which is 5.5.0 as of this post) Fixed the error on linux. but now im comming to the same problem on windows.

I already set the is_heroku_version to false as leaving it on true gave me this huge error on windows and i also got it on linux as well. ill post it here:

Logging in...
Disconnected from Discord
{ [Error: Bad Request]
original: null,
response:
Response {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
res:
IncomingMessage {
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
socket: [Object],
connection: [Object],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Object],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'BAD REQUEST',
client: [Object],
_consuming: true,
_dumped: false,
req: [Object],
text: '{"password": ["Please enter a password."], "email": ["Please enter an email."]}',
read: [Function],
body: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
_agent: false,
_formData: null,
method: 'POST',
url: 'https://discordapp.com/api/auth/login',
header: [Object],
writable: true,
_redirects: 0,
_maxRedirects: 5,
cookies: '',
qs: {},
qsRaw: [],
_redirectList: [],
_streamRequest: false,
_data: [Object],
req: [Object],
protocol: 'https:',
host: 'discordapp.com',
_callback: [Function],
res: [Object],
response: [Circular],
_timeout: 0,
called: true },
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 3,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedHeader: [Object],
_contentLength: 2,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'POST /api/auth/login HTTP/1.1\r\nHost: discordapp.com\r\nAccept-Encoding: gzip, deflate\r\nuser-agent: DiscordBot (https://github.com/hydrabolt/discord.js, 5.3.2)\r\ncontent-type: application/json\r\nContent-Length: 2\r\nConnection: close\r\n\r\n',
_headers: [Object],
_headerNames: [Object],
_onPendingData: null,
agent: [Object],
socketPath: undefined,
method: 'POST',
path: '/api/auth/login',
parser: null,
res: [Object] },
links: {},
text: '{"password": ["Please enter a password."], "email": ["Please enter an email."]}',
body: { password: [Object], email: [Object] },
files: {},
buffered: true,
headers:
{ server: 'cloudflare-nginx',
date: 'Fri, 29 Jan 2016 18:20:08 GMT',
'content-type': 'application/json',
'content-length': '79',
connection: 'close',
'set-cookie': [Object],
'strict-transport-security': 'max-age=31536000; includeSubdomains',
via: '1.1 google',
'cf-ray': '26c6f3081dcb10db-ORD' },
header:
{ server: 'cloudflare-nginx',
date: 'Fri, 29 Jan 2016 18:20:08 GMT',
'content-type': 'application/json',
'content-length': '79',
connection: 'close',
'set-cookie': [Object],
'strict-transport-security': 'max-age=31536000; includeSubdomains',
via: '1.1 google',
'cf-ray': '26c6f3081dcb10db-ORD' },
statusCode: 400,
status: 400,
statusType: 4,
info: false,
ok: false,
redirect: false,
clientError: true,
serverError: false,
error:
{ [Error: cannot POST /api/auth/login (400)]
status: 400,
text: '{"password": ["Please enter a password."], "email": ["Please enter an email."]}',
method: 'POST',
path: '/api/auth/login' },
accepted: false,
noContent: false,
badRequest: true,
unauthorized: false,
notAcceptable: false,
forbidden: false,
notFound: false,
type: 'application/json',
setEncoding: [Function: bound ],
redirects: [] },
status: 400 }
WARN failed to connect

When leaving it on false i still get:

Logging in...
Disconnected form Discord.

from mirai.

brussell98 avatar brussell98 commented on May 28, 2024

hmm....
Well it isn't throwing an error and it isn't saying that there is no token...
You're sure your email and password are correct right?
I'll test some stuff when I get home because it should work with the correct info.

from mirai.

JalinRio42 avatar JalinRio42 commented on May 28, 2024

its the right email and password.
Do i need to fill out the stuff like mal_user, mal_pass, weather_api_key, and osu_api_key? as i didn't think i needed them.
If not then ill just wait till you get home and stuff :)

from mirai.

brussell98 avatar brussell98 commented on May 28, 2024

Those aren't needed. They will properly fail if the command is use without them defined.

from mirai.

brussell98 avatar brussell98 commented on May 28, 2024

Ok, I think I know the problem. In discord.js indev it seems that meew0 broke first-time login. For now just change the line in package.json "discord.js": "hydrabolt/discord.js#indev" to "discord.js": "*".
Then delete node_modules and run npm i again

This should be fixed very soon so you should be able to change it back in a few days max.

from mirai.

JalinRio42 avatar JalinRio42 commented on May 28, 2024

It worked! sorry for the long reply. it works on both Windows and Linux! thanks so much!

from mirai.

brussell98 avatar brussell98 commented on May 28, 2024

btw here is the issue so you can know when it's fixed: discordjs/discord.js#167

from mirai.

abalabahaha avatar abalabahaha commented on May 28, 2024

Yeah we're working on a fix, expect it within a few hours

from mirai.

abalabahaha avatar abalabahaha commented on May 28, 2024

FYI @brussell98 @Sonrio224 logins should work with indev now

from mirai.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.