Skip to content

an easy way to have notification to you discord server with coordinates of the computer from minecraft

Notifications You must be signed in to change notification settings

torik988/computer-craft-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Redstone Discord Notifier

Overview

This Lua script is designed to detect a redstone signal in Minecraft and notify a Discord channel using a webhook. It sends a message in embed mode, including GPS coordinates and an avatar.

Prerequisites

Before using this script, make sure you have the following:

  • ComputerCraft or CC: Tweaked installed in your Minecraft world.
  • A Discord webhook URL for the channel where you want to receive notifications.

GPS Configuration

The script includes a function to obtain and display GPS coordinates in the Discord message.

To use the GPS functionality, follow these steps:

  1. Set up three computers (computers A, B, and C) with an ender-modem attached to each.
  2. Arrange them as shown in the image. Upload the GPS/startup.lua script to each computer and specify the coordinates of each computer.

Setup

  1. Open the Lua script in your ComputerCraft computer.
  2. Replace "your-discord-webhook-url" with your Discord webhook URL in the webhookURL variable.
  3. Optionally, replace the avatarURL variable with the URL of your desired avatar.

Usage

  • The script continuously checks for a redstone signal.
  • If a redstone signal is detected, it sends a Discord message with embed mode, displaying the GPS coordinates and the detection message.
  • To avoid spam, it waits for a few seconds (configurable) before checking for the signal again.
-- Example Configuration
local webhookURL = "your-discord-webhook-url"
local avatarURL = "https://media.energetic.pw/pm5sfo-82l.jpg"

-- ... (rest of the configuration)

-- Example Usage
sendDiscordEmbedMessageWithAvatar("Redstone Detection", "A redstone signal has been detected!\n" .. printGPSCoordinates(), 0xFF0000, avatarURL)

About

an easy way to have notification to you discord server with coordinates of the computer from minecraft

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages