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

Method handle

src/handlers/button.handler.ts:18–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 }
17
18 async handle() {
19 await this.inter.deferReply({ ephemeral: true });
20 const button = BUTTONS.get(this.inter.customId);
21 if (button) {
22 const isAdmin = button.adminOnly;
23
24 this.inter.respond = (message: (InteractionReplyOptions | string), log = false) =>
25 InteractionUtils.respond(this.inter, isAdmin, message, log);
26
27 this.inter.log = (originalMessage: Message | string) =>
28 LoggingUtils.log(this.inter.store, isAdmin, originalMessage);
29
30 if (isAdmin) {
31 AdminUtils.verifyIsAdmin(this.inter.store, this.inter.member);
32 }
33
34 incrementGuildStat(this.inter.guildId, "buttonsReceived");
35 await button.handle(this.inter);
36 }
37 }
38}

Callers

nothing calls this directly

Calls 3

incrementGuildStatFunction · 0.90
handleMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected