mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
fix setUsername()
This commit is contained in:
@@ -1147,7 +1147,7 @@ var InternalClient = (function () {
|
|||||||
//def updateDetails
|
//def updateDetails
|
||||||
|
|
||||||
InternalClient.prototype.updateDetails = function updateDetails(data) {
|
InternalClient.prototype.updateDetails = function updateDetails(data) {
|
||||||
if (!email) {
|
if (!this.email) {
|
||||||
throw new Error("Can't use updateDetails because only a token has been used for login!");
|
throw new Error("Can't use updateDetails because only a token has been used for login!");
|
||||||
}
|
}
|
||||||
return this.apiRequest("patch", _Constants.Endpoints.ME, true, {
|
return this.apiRequest("patch", _Constants.Endpoints.ME, true, {
|
||||||
|
|||||||
@@ -969,7 +969,7 @@ export default class InternalClient {
|
|||||||
|
|
||||||
//def updateDetails
|
//def updateDetails
|
||||||
updateDetails(data) {
|
updateDetails(data) {
|
||||||
if(!email) {
|
if(!this.email) {
|
||||||
throw new Error("Can't use updateDetails because only a token has been used for login!");
|
throw new Error("Can't use updateDetails because only a token has been used for login!");
|
||||||
}
|
}
|
||||||
return this.apiRequest("patch", Endpoints.ME, true, {
|
return this.apiRequest("patch", Endpoints.ME, true, {
|
||||||
|
|||||||
Reference in New Issue
Block a user