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

Function verifyCommandIsFromGuild

src/utils/interaction.utils.ts:82–86  ·  view source on GitHub ↗
(inter: Interaction)

Source from the content-addressed store, hash-verified

80 }
81
82 export function verifyCommandIsFromGuild(inter: Interaction) {
83 if (!inter.guild) {
84 throw new Error("This command can only be used in servers");
85 }
86 }
87
88 export async function verifyCanSendMessages(jsChannel: GuildTextBasedChannel) {
89 function throwPermissionError(permissionName: string) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected