v0.3 - Added command receipt for /status; added /patchnotes command #7
Merged
ajohnson
merged 5 commits from dev
into master
6 years ago
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Empyrion Chat Bot by SKYFALL
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=ivo
|
||||
WorkingDirectory=/opt/skyfall/egs-bot
|
||||
StandardOutput=file:/var/log/skyfall/egs-bot/run.log
|
||||
StandardError=file:/var/log/skyfall/egs-bot/error.log
|
||||
PIDFile=/var/run/skyfall/egsbot.pid
|
||||
ExecStart=/usr/bin/ruby /opt/skyfall/egs-bot/run.rb
|
||||
SuccessExitStatus=SIGKILL
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -0,0 +1,5 @@
|
||||
New features:
|
||||
+ Auto self-resurrection after random bot-suicide.
|
||||
+ This `/patchnotes` command.
|
||||
+ Instant message confirmation for `/status` command.
|
||||
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
|
||||
|
||||
KEY=$1
|
||||
CHATID=$2
|
||||
TIME="4"
|
||||
URL="https://api.telegram.org/bot$KEY/sendMessage"
|
||||
MESSAGE="Confirmation: The server appears online!
|
||||
One moment while I collect some server information..."
|
||||
|
||||
curl -s --max-time $TIME -d "chat_id=${CHATID}&disable_web_page_preview=1&text=${MESSAGE}" $URL >/dev/null
|
||||
|
Loading…
Reference in new issue