From c611c0df87eb507515e1f5f52bfb8c7e177ed64b Mon Sep 17 00:00:00 2001 From: Baitinq Date: Fri, 17 Feb 2023 02:06:49 +0100 Subject: Bot: Send message to discord on goal_reached --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index 226fa74..2a9d3fb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -76,6 +76,10 @@ bot.once('spawn', async () => { }, 2000); }) +bot.on('goal_reached', async () => { + sendMessageToChannel(`Reached goal (${goal}) with ${bot.username}\n\tCoords: ${bot.entity?.position}\n\tDim: ${bot.game.dimension}\n\tHP: ${bot.health}`) +}) + bot.on('entityMoved', async (entity: any) => { if (entity.player === null || entity.username === undefined) return if (entity.username === bot.username) return -- cgit 1.4.1