(inter: Interaction)
| 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) { |
nothing calls this directly
no outgoing calls
no test coverage detected