mirror of
https://github.com/danbulant/discord.js
synced 2026-06-24 17:21:59 +00:00
Check if user or bot and require email for user
This commit is contained in:
parent
72340845e5
commit
93e3106404
2 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue