diff --git a/config.template.json b/config.template.json index 714d0c4..6fb1f1c 100644 --- a/config.template.json +++ b/config.template.json @@ -1,6 +1,6 @@ { - "Token": "", - "AlertRoomID": "", + "Token": "your_bot_token_id", + "AlertRoomID": "your_room_id", "Servers": [ { "Name": "Elysium PvP", diff --git a/dist/ServerStatus-linux b/dist/ServerStatus-linux new file mode 100755 index 0000000..3fa72b5 Binary files /dev/null and b/dist/ServerStatus-linux differ diff --git a/dist/ServerStatus-windows.exe b/dist/ServerStatus-windows.exe new file mode 100755 index 0000000..c43ea68 Binary files /dev/null and b/dist/ServerStatus-windows.exe differ diff --git a/dist/config.json b/dist/config.json new file mode 100644 index 0000000..6fb1f1c --- /dev/null +++ b/dist/config.json @@ -0,0 +1,31 @@ +{ + "Token": "your_bot_token_id", + "AlertRoomID": "your_room_id", + "Servers": [ + { + "Name": "Elysium PvP", + "Address": "149.202.207.235", + "Port": 8099 + }, + { + "Name": "Zethkur PvP", + "Address": "151.80.103.221", + "Port": 8093 + }, + { + "Name": "Anathema PvP", + "Address": "149.202.211.5", + "Port": 8095 + }, + { + "Name": "Darrowshire PvE", + "Address": "164.132.233.125", + "Port": 8097 + }, + { + "Name": "Elysium Authentication Server", + "Address": "logon.elysium-project.org", + "Port": 3724 + } + ] +} \ No newline at end of file diff --git a/makefile b/makefile new file mode 100644 index 0000000..21f87fa --- /dev/null +++ b/makefile @@ -0,0 +1,5 @@ +all: + @rm -rf ./dist + @GOOS=windows GOARCH=386 go build -o ./dist/ServerStatus-windows.exe main.go + @go build -o ./dist/ServerStatus-linux main.go + @cp config.template.json ./dist/config.json \ No newline at end of file diff --git a/readme.md b/readme.md index bf0b0f8..a2bcc2d 100644 --- a/readme.md +++ b/readme.md @@ -5,10 +5,19 @@ This bot will send a chat notification when the status of a server changes. ## Configuration -- Rename config.template.json to config.json -- Add your bot token -- Add the room ID in which you want the notifications -- Compile and run! +- Download or Clone the repo +- Add your bot token to the config.json file in the dist folder +- Add your room id to this file as well +- Execute the correct executable for your operating system! + +### How to get bot token +https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token + +### How to get your room ID + +To get IDs, turn on Developer Mode in the Discord client (User Settings -> Appearance) and then right-click your name/icon anywhere in the client and select Copy ID. + + ## List server status in discord channel @@ -18,6 +27,6 @@ This bot will send a chat notification when the status of a server changes. Elysium PvP is online! Zethkur PvP is online! Anathema PvP is online! -Darrowshire PvP is online! +Darrowshire PvE is online! Elysium Authentication Server is online! -``` \ No newline at end of file +```