mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Let updateDetails use data.email if possible (thanks @calc84maniac)
This commit is contained in:
committed by
abalabahaha
parent
9fc5a752f8
commit
701c0ca9c4
@@ -1147,7 +1147,7 @@ var InternalClient = (function () {
|
||||
//def updateDetails
|
||||
|
||||
InternalClient.prototype.updateDetails = function updateDetails(data) {
|
||||
if (!this.email) {
|
||||
if (!this.email && !data.email) {
|
||||
throw new Error("Can't use updateDetails because only a token has been used for login!");
|
||||
}
|
||||
return this.apiRequest("patch", _Constants.Endpoints.ME, true, {
|
||||
|
||||
Reference in New Issue
Block a user