update setting
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "discord.js-selfbot-v13",
 | 
			
		||||
  "version": "1.4.1",
 | 
			
		||||
  "version": "1.4.2",
 | 
			
		||||
  "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
 | 
			
		||||
  "main": "./src/index.js",
 | 
			
		||||
  "types": "./typings/index.d.ts",
 | 
			
		||||
 
 | 
			
		||||
@@ -373,6 +373,45 @@ class ClientUserSettingManager {
 | 
			
		||||
    }
 | 
			
		||||
    this.edit({ guild_folders: this.rawSetting.guild_folders });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Restricted guilds setting
 | 
			
		||||
   * @param {boolean} status Restricted status
 | 
			
		||||
   * @returns {Promise}
 | 
			
		||||
   */
 | 
			
		||||
  restrictedGuilds(status) {
 | 
			
		||||
    if (typeof status !== 'boolean') {
 | 
			
		||||
      throw new TypeError('INVALID_TYPE', 'status', 'boolean', true);
 | 
			
		||||
    }
 | 
			
		||||
    return this.edit({
 | 
			
		||||
      default_guilds_restricted: status,
 | 
			
		||||
      restricted_guilds: status ? this.client.guilds.map(v => v.id) : [],
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
  /**
 | 
			
		||||
   * Add a guild to the list of restricted guilds.
 | 
			
		||||
   * @param {GuildIDResolve} guildId The guild to add
 | 
			
		||||
   * @returns {Promise}
 | 
			
		||||
   */
 | 
			
		||||
  addRestrictedGuild(guildId) {
 | 
			
		||||
    const temp = Object.assign(
 | 
			
		||||
      [],
 | 
			
		||||
      this.disableDMfromServer.map((v, k) => k),
 | 
			
		||||
    );
 | 
			
		||||
    if (temp.includes(guildId)) throw new Error('Guild is already restricted');
 | 
			
		||||
    temp.push(guildId);
 | 
			
		||||
    return this.edit({ restricted_guilds: temp });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * Remove a guild from the list of restricted guilds.
 | 
			
		||||
   * @param {GuildIDResolve} guildId The guild to remove
 | 
			
		||||
   * @returns {Promise}
 | 
			
		||||
   */
 | 
			
		||||
  removeRestrictedGuild(guildId) {
 | 
			
		||||
    if (!this.disableDMfromServer.delete(guildId)) throw new Error('Guild is already restricted');
 | 
			
		||||
    return this.edit({ restricted_guilds: this.disableDMfromServer.map((v, k) => k) });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
module.exports = ClientUserSettingManager;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								typings/index.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -3126,6 +3126,9 @@ export class ClientUserSettingManager {
 | 
			
		||||
  public setTheme(value?: 'dark' | 'light'): Promise<ClientUserSetting>;
 | 
			
		||||
  public setLocale(value: localeSetting): Promise<ClientUserSetting>;
 | 
			
		||||
  public setCustomStatus(value?: CustomStatusOption): Promise<ClientUserSetting>;
 | 
			
		||||
  public restrictedGuilds(status: boolean): Promise;
 | 
			
		||||
  public addRestrictedGuild(guildId: GuildIdResolvable): Promise;
 | 
			
		||||
  public removeRestrictedGuild(guildId: GuildIdResolvable): Promise;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user