mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
1 less nested if
This commit is contained in:
@@ -109,11 +109,9 @@ export async function sendMessage(
|
||||
throw new Error(Errors.LINK_BUTTON_CANNOT_HAVE_CUSTOM_ID);
|
||||
}
|
||||
if (
|
||||
!component.customId
|
||||
!component.customId && component.type !== ButtonStyles.Link
|
||||
) {
|
||||
if (component.type !== ButtonStyles.Link) {
|
||||
throw new Error(Errors.BUTTON_REQUIRES_CUSTOM_ID);
|
||||
}
|
||||
throw new Error(Errors.BUTTON_REQUIRES_CUSTOM_ID);
|
||||
}
|
||||
|
||||
if (!validateLength(component.label, { max: 80 })) {
|
||||
|
||||
Reference in New Issue
Block a user