mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Check if user or bot and require email for user
This commit is contained in:
@@ -1219,6 +1219,8 @@ var InternalClient = (function () {
|
||||
//def updateDetails
|
||||
|
||||
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");
|
||||
|
||||
var options = {
|
||||
avatar: this.resolver.resolveToBase64(data.avatar) || this.user.avatar,
|
||||
username: data.username || this.user.username
|
||||
|
||||
@@ -1005,6 +1005,9 @@ export default class InternalClient {
|
||||
|
||||
//def updateDetails
|
||||
updateDetails(data) {
|
||||
if (!this.bot && !(this.email || data.email))
|
||||
throw new Error("Must provide email since a token was used to login");
|
||||
|
||||
var options = {
|
||||
avatar: this.resolver.resolveToBase64(data.avatar) || this.user.avatar,
|
||||
username: data.username || this.user.username
|
||||
|
||||
Reference in New Issue
Block a user