GuildBanManager

export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable>
export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable>
Manages API methods for guild bans and stores their cache.
Readonly
cache:Collection<K, Holds>
The cache of items for this manager.
Inherited from DataManager
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
guild:Guild
The guild this Manager belongs to
Readonly
holds:Constructable<Holds>
The data structure belonging to this manager.
Inherited from DataManager
create(user, options?):Promise<GuildMember | User | Snowflake>
Bans a user from the guild.
Returns
Result object will be resolved as specifically as possible. If the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot be resolved, the user id will be the result.
NameTypeOptionalDescription
userUserResolvableNoThe user to ban
optionsBanOptionsYesOptions for the ban
fetch(options):Promise<GuildBan>
Fetches ban(s) from Discord.
NameTypeOptionalDescription
optionsUserResolvable | FetchBanOptionsNoOptions for fetching guild ban(s)
remove(user, reason?):Promise<User | null>
Unbans a user from the guild.
NameTypeOptionalDescription
userUserResolvableNoThe user to unban
reasonstringYesReason for unbanning user
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):K
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceK | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<K, Holds>