Class: GuildMemberCache
Extends
Constructors
new GuildMemberCache()
new GuildMemberCache(
client
,guild
,members
?):GuildMemberCache
Parameters
Parameter | Type |
---|---|
client | Client |
guild | Guild |
members ? | any [] |
Returns
Overrides
Defined in
src/core/cache/GuildMemberCache.ts:11 (opens in a new tab)
Properties
Property | Modifier | Type | Description | Inherited from | Defined in |
---|---|---|---|---|---|
[toStringTag] | readonly | string | - | Collection .[toStringTag] | node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137 |
guild | public | Guild | - | - | src/core/cache/GuildMemberCache.ts:8 (opens in a new tab) |
size | readonly | number | Collection .size | node_modules/typescript/lib/lib.es2015.collection.d.ts:45 | |
[species] | readonly | MapConstructor | - | Collection .[species] | node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319 |
Methods
[iterator]()
[iterator]():
IterableIterator
<[any
,any
]>
Returns an iterable of entries in the map.
Returns
IterableIterator
<[any
, any
]>
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:119
clear()
clear():
void
Returns
void
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:20
delete()
delete(
key
):boolean
Parameters
Parameter | Type |
---|---|
key | any |
Returns
boolean
true if an element in the Map existed and has been removed, or false if the element does not exist.
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:24
entries()
entries():
IterableIterator
<[any
,any
]>
Returns an iterable of key, value pairs for every entry in the map.
Returns
IterableIterator
<[any
, any
]>
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:124
fetch()
fetch(
guildId
,memberId
):Promise
<GuildMember
>
Parameters
Parameter | Type |
---|---|
guildId | string |
memberId | string |
Returns
Promise
<GuildMember
>
Defined in
src/core/cache/GuildMemberCache.ts:33 (opens in a new tab)
first()
first():
GuildMember
Returns
Inherited from
Defined in
src/core/classes/Collection.ts:23 (opens in a new tab)
forEach()
forEach(
callbackfn
,thisArg
?):void
Executes a provided function once per each key/value pair in the Map, in insertion order.
Parameters
Parameter | Type |
---|---|
callbackfn | (value , key , map ) => void |
thisArg ? | any |
Returns
void
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:28
get()
get<
V
>(key
):null
|V
Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
Type Parameters
Type Parameter |
---|
V extends GuildMember |
Parameters
Parameter | Type |
---|---|
key | any |
Returns
null
| V
Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
Inherited from
Defined in
src/core/classes/Collection.ts:4 (opens in a new tab)
has()
has(
key
):boolean
Parameters
Parameter | Type |
---|---|
key | any |
Returns
boolean
boolean indicating whether an element with the specified key exists or not.
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.collection.d.ts:37
keys()
keys():
IterableIterator
<any
>
Returns an iterable of keys in the map
Returns
IterableIterator
<any
>
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:129
last()
last():
GuildMember
Returns
Inherited from
Defined in
src/core/classes/Collection.ts:27 (opens in a new tab)
random()
random():
GuildMember
Returns
Inherited from
Defined in
src/core/classes/Collection.ts:31 (opens in a new tab)
remove()
remove(
key
):boolean
Parameters
Parameter | Type |
---|---|
key | any |
Returns
boolean
Inherited from
Defined in
src/core/classes/Collection.ts:15 (opens in a new tab)
set()
set<
V
>(key
,value
):V
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
Type Parameters
Type Parameter |
---|
V extends GuildMember |
Parameters
Parameter | Type |
---|---|
key | any |
value | V |
Returns
V
Inherited from
Defined in
src/core/classes/Collection.ts:9 (opens in a new tab)
toArray()
toArray():
GuildMember
[]
Returns
Inherited from
Defined in
src/core/classes/Collection.ts:19 (opens in a new tab)
values()
values():
IterableIterator
<any
>
Returns an iterable of values in the map
Returns
IterableIterator
<any
>
Inherited from
Defined in
node_modules/typescript/lib/lib.es2015.iterable.d.ts:134