From 01b07aa2fd3e1a4a46d47f1b506bc24adb658a7f Mon Sep 17 00:00:00 2001 From: EazyFTW Date: Tue, 1 Sep 2020 15:50:32 -0500 Subject: [PATCH] Added no preorder msg. --- .../TechDiscordBot/module/cmds/PreorderCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/TechsCode/TechDiscordBot/module/cmds/PreorderCommand.java b/src/main/java/me/TechsCode/TechDiscordBot/module/cmds/PreorderCommand.java index 9f15e50c..66abf52e 100644 --- a/src/main/java/me/TechsCode/TechDiscordBot/module/cmds/PreorderCommand.java +++ b/src/main/java/me/TechsCode/TechDiscordBot/module/cmds/PreorderCommand.java @@ -61,8 +61,11 @@ public void onCommand(TextChannel channel, Message message, Member member, Strin Preorder preorder = TechDiscordBot.getStorage().getPreorders(getRoles().get(0).replace(" Preorder", ""), false).stream().filter(po -> po.getDiscordId() == member.getUser().getIdLong()).findFirst().orElse(null); if(preorder == null) { + new TechEmbedBuilder("Preorder Cmd - Error") + .error() + .setText("Could not find a preorder that belongs to " + selectedMember.getAsMention() + "!") + .sendTemporary(channel, 10); return; - } boolean showEmail = isArg(args, "showEmail") && (preorder.getDiscordId() == selectedMember.getUser().getIdLong() || isStaff(member));