Files
notify-on-start/README.md
T

56 lines
1.9 KiB
Markdown
Raw Normal View History

2023-03-28 19:26:08 +08:00
# notify-on-start
2023-03-28 19:24:11 +08:00
this project is made to just send messages to Discord webhooks when events trigger
this was just made to remember whatever goofy things we did in a minecraft server, in discord
2023-03-28 19:26:08 +08:00
or, you know, notify us when the server starts (but not ends)
# Prerequisites
Before using this plugin, you must:
* Get Spigot
* Get a JAR file from [the releases](https://git.sob.moe/sobrooms/notify-on-start/releases) or [Google Drive](https://drive.google.com/drive/folders/11wMPjOh2b8oRzpeJOrOI4ZAkImOlr93u?usp=sharing) (the drive folder is frequently updated)
2023-03-28 19:24:11 +08:00
# making webhooks
If you already know how, you can skip this step.
To make a webhook:
1. Go to a Discord server.\
You can make a new channel or use an existing one.
2. Right-click on the channel.
3. Click "Edit Channel".
4. Click "Integrations" and click "Webhooks".
5. Click "New Webhook".
6. Give the webhook a name. As an example, we will use `notify` as the webhook name.
7. You may change the channel where it is associated/linked to, change the webhook name, and set a picture for the webhook.
8. Copy the webhook link.
# using this thing
Of course, you must get a release first, as said in the prerequisites. After you get a jar, put it in the `plugins` folder
2023-04-12 06:01:23 +00:00
On first run, it will make a directory in the server's base directory.\
In it, there will be two important files:\
2023-03-28 19:24:11 +08:00
These files will be `NoS/notifyWebhook.json` and `NoS/pubMessageWebhook.json`.
Of course, put the webhook URL of where the events should be logged in `notifyWebhook.json`
`pubMessageWebhook.json` is for a command named `/send-message`. This will simply send text to the webhook containing provided text.\
Put the webhook link in `url`.
2023-04-12 06:01:23 +00:00
An example of what these files' content should be:
2023-03-28 19:24:11 +08:00
```json
{
2023-03-29 00:36:40 +00:00
"url": "<get the webhook link from earlier and paste>"
2023-03-28 19:24:11 +08:00
}
```
2023-03-29 00:36:05 +00:00
If you change this value, you have to restart the server to apply changes.
By default, its value is:
```json
{
"url": "default-ns"
}
```