mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Resolve promise for all botHasChannelPermissions()
This commit is contained in:
@@ -20,11 +20,12 @@ export async function createWebhook(
|
||||
channelID: string,
|
||||
options: WebhookCreateOptions,
|
||||
) {
|
||||
const hasManageWebhooksPerm = await botHasChannelPermissions(
|
||||
channelID,
|
||||
[Permissions.MANAGE_WEBHOOKS],
|
||||
);
|
||||
if (
|
||||
!botHasChannelPermissions(
|
||||
channelID,
|
||||
[Permissions.MANAGE_WEBHOOKS],
|
||||
)
|
||||
!hasManageWebhooksPerm
|
||||
) {
|
||||
throw new Error(Errors.MISSING_MANAGE_WEBHOOKS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user