mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
Fix bot detection on updateDetails
This commit is contained in:
@@ -1241,7 +1241,7 @@ var InternalClient = (function () {
|
|||||||
//def updateDetails
|
//def updateDetails
|
||||||
|
|
||||||
InternalClient.prototype.updateDetails = function updateDetails(data) {
|
InternalClient.prototype.updateDetails = function updateDetails(data) {
|
||||||
if (!this.bot && !(this.email || data.email)) throw new Error("Must provide email since a token was used to login");
|
if (!this.user.bot && !(this.email || data.email)) throw new Error("Must provide email since a token was used to login");
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
avatar: this.resolver.resolveToBase64(data.avatar) || this.user.avatar,
|
avatar: this.resolver.resolveToBase64(data.avatar) || this.user.avatar,
|
||||||
|
|||||||
@@ -1013,7 +1013,7 @@ export default class InternalClient {
|
|||||||
|
|
||||||
//def updateDetails
|
//def updateDetails
|
||||||
updateDetails(data) {
|
updateDetails(data) {
|
||||||
if (!this.bot && !(this.email || data.email))
|
if (!this.user.bot && !(this.email || data.email))
|
||||||
throw new Error("Must provide email since a token was used to login");
|
throw new Error("Must provide email since a token was used to login");
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
|
|||||||
Reference in New Issue
Block a user