-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove user bots #2559
Remove user bots #2559
Changes from 3 commits
95a938c
8f43b51
d99d201
31fb378
64c2a7b
1ca256b
d39fd45
0b4aa3b
ce71c91
a4b9d56
02dec1b
ff4f5a1
51da66e
638d618
00f2d05
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,7 @@ class RESTManager { | |
|
||
getAuth() { | ||
const token = this.client.token || this.client.accessToken; | ||
const prefixed = !!this.client.application || (this.client.user && this.client.user.bot); | ||
if (token && prefixed) return `${this.tokenPrefix} ${token}`; | ||
if (token && this.client.application) return `${this.tokenPrefix} ${token}`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this cause a big issue for bot accounts if this.client.application is undefined? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that was a derp. Good catch! |
||
else if (token) return token; | ||
throw new Error('TOKEN_MISSING'); | ||
} | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this must remain for bots with friends and to handle the presence of the client