Skip to content

Commit

Permalink
Add LazyEmbed#unexepectedError(String)
Browse files Browse the repository at this point in the history
  • Loading branch information
srnyx committed Aug 31, 2024
1 parent 0f7ea33 commit 0e777bb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/java/xyz/srnyx/lazylibrary/LazyEmbed.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,22 @@ public static LazyEmbed unexpectedError() {
.setDescription("An unexpected error occurred, please try again!\n*If the issue persists, please contact support*");
}

/**
* A pre-built {@link LazyEmbed} for when an unexpected error occurs
*
* @param error a short description of the error that occurred
*
* @return the {@link LazyEmbed}
*/
@NotNull
public static LazyEmbed unexpectedError(@NotNull String error) {
return new LazyEmbed()
.setColor(Color.RED)
.setTitle(LazyEmoji.WARNING_CLEAR + " Unexpected error!")
.setDescription("An unexpected error occurred, please try again!\n*If the issue persists, please contact support*")
.addField("Error", error, true);
}

/**
* A pre-built {@link LazyEmbed} for when a user doesn't have permission to do something
*
Expand Down

0 comments on commit 0e777bb

Please sign in to comment.