(inter: ButtonInteraction)
| 4 | |
| 5 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected