mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Merge pull request #237 from nicholastay/patch-1
Fixes for bot accounts \o/
This commit is contained in:
@@ -1241,7 +1241,7 @@ 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");
|
||||
if (!this.user.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,
|
||||
|
||||
@@ -99,7 +99,7 @@ var VoiceConnection = (function (_EventEmitter) {
|
||||
this.client.internal.sendWS({
|
||||
op: 4,
|
||||
d: {
|
||||
guild_id: null,
|
||||
guild_id: this.server.id,
|
||||
channel_id: null,
|
||||
self_mute: true,
|
||||
self_deaf: false
|
||||
|
||||
@@ -1013,7 +1013,7 @@ export default class InternalClient {
|
||||
|
||||
//def updateDetails
|
||||
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");
|
||||
|
||||
var options = {
|
||||
|
||||
@@ -62,7 +62,7 @@ export default class VoiceConnection extends EventEmitter {
|
||||
{
|
||||
op : 4,
|
||||
d : {
|
||||
guild_id : null,
|
||||
guild_id : this.server.id,
|
||||
channel_id : null,
|
||||
self_mute : true,
|
||||
self_deaf : false
|
||||
|
||||
Reference in New Issue
Block a user