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) {
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(() -> {
final Webhook webhook = new Webhook(ChipmunkMod.CONFIG.bots.testbot.webhookUrl);
webhook.setUsername("ChipmunkMod");