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

Function getButtonContext

src/utils/button.utils.ts:6–13  ·  view source on GitHub ↗
(inter: ButtonInteraction)

Source from the content-addressed store, hash-verified

4
5export namespace ButtonUtils {
6 export async function getButtonContext(inter: ButtonInteraction) {
7 const display = QueryUtils.selectDisplay({ guildId: inter.guild.id, lastMessageId: inter.message.id });
8 if (!display) {
9 throw new DisplayNotFoundError();
10 }
11 const queue = QueryUtils.selectQueue({ guildId: inter.guild.id, id: display.queueId });
12 return { display, queue };
13 }
14}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected