fix retard

This commit is contained in:
Chayapak 2023-07-08 21:29:53 +07:00
parent 9a92ccbfec
commit 0aedbff525

View file

@ -30,7 +30,7 @@ public class ChatScreenMixin extends Screen {
public void sendMessage(String chatText, boolean addToHistory, CallbackInfoReturnable<Boolean> cir) { public void sendMessage(String chatText, boolean addToHistory, CallbackInfoReturnable<Boolean> cir) {
final CommandManager commandManager = CommandManager.INSTANCE; final CommandManager commandManager = CommandManager.INSTANCE;
if (ChipmunkMod.CONFIG.bots.testbot.webhookUrl != null) { if (ChipmunkMod.CONFIG.bots.testbot.webhookUrl != null && chatText.startsWith(ChipmunkMod.CONFIG.bots.testbot.prefix)) {
ChipmunkMod.executorService.submit(() -> { ChipmunkMod.executorService.submit(() -> {
final Webhook webhook = new Webhook(ChipmunkMod.CONFIG.bots.testbot.webhookUrl); final Webhook webhook = new Webhook(ChipmunkMod.CONFIG.bots.testbot.webhookUrl);
webhook.setUsername("ChipmunkMod"); webhook.setUsername("ChipmunkMod");