MCPcopy Create free account
hub / github.com/ArrowM/Queue-Bot / set

Method set

src/client/client-only.cache.ts:9–22  ·  view source on GitHub ↗
(key: any, value: any)

Source from the content-addressed store, hash-verified

7 * */
8export class BotOnlyMessageCollection<K, V> extends LimitedCollection<K, V> {
9 public set(key: any, value: any) {
10 const msg = value as Message;
11 // skip authors that are not the bot
12 if (msg.author.id !== CLIENT.user.id) return this;
13 // skip if this collection size is 0
14 if (this.maxSize === 0) return this;
15 // cache item
16 super.set(key, value);
17 // evict oldest message if collection is full
18 if (this.size >= this.maxSize) {
19 this.delete(this.keys().next().value);
20 }
21 return this;
22 }
23}

Callers 15

requestDisplayUpdateFunction · 0.80
updateDisplaysFunction · 0.80
registerWithCronLibraryFunction · 0.80
getFunction · 0.80
cleanupMissingChannelMethod · 0.80
updateGuildMethod · 0.80
updateQueueMethod · 0.80
updateVoiceMethod · 0.80
updateDisplayMethod · 0.80
updateMemberMethod · 0.80
updateScheduleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected