Minecraft-Console-Client
Minecraft-Console-Client copied to clipboard
using discord webhooks on events
So I looked at the discord webhooks chatbot script and it seems to just be a relay mechanism for server messages to the discord server
I am using something similar to the example script sample-script-with-world-access.cs, where it watches for a lamp to turn off. does anyone know how to send a webhook to the discord server when the condition is met?
LogToConsole("Lamp at " + lampLoc + " is currently turned OFF !!!");
for (int i = 0; i < 3; i++)
// SEND TO DISCORD SERVER HERE SOMEHOW
break;```
Currently that's not possible but I think if you're willing to improve the bot, you could add a command inside /discordwebhook like discordwebkook send <message> so that you can call it from your script.
You can also just copy this function and replace some variables (such as the webhook url) with some hardcoded values. Then you can directly send messages to a webhook. I can recommend this video. Although it is in german, you should be able to recreate what he is doing there.