Fix minor bug
TypeError: Cannot set properties of null (setting 'status')
This commit is contained in:
parent
577922bf31
commit
9307497a0a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js-selfbot-v13",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||
"main": "./src/index.js",
|
||||
"types": "./typings/index.d.ts",
|
||||
|
@ -103,7 +103,7 @@ class ClientUserSettingManager extends CachedManager {
|
||||
this.showEmojiReactions = data.render_reactions;
|
||||
}
|
||||
if ('custom_status' in data) {
|
||||
this.customStatus = data.custom_status;
|
||||
this.customStatus = data.custom_status || {};
|
||||
this.customStatus.status = data.status;
|
||||
}
|
||||
if ('guild_folders' in data) {
|
||||
@ -130,6 +130,7 @@ class ClientUserSettingManager extends CachedManager {
|
||||
if (this.client.bot) throw new Error('INVALID_BOT_METHOD');
|
||||
try {
|
||||
const data = await this.client.api.users('@me').settings.get();
|
||||
console.log(data);
|
||||
this._patch(data);
|
||||
return this;
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user