From 53a1d791dd9636367a7ec0e474cd7f3f1eeb24f9 Mon Sep 17 00:00:00 2001 From: nedko Date: Mon, 5 Dec 2022 21:16:21 +0000 Subject: [PATCH] Added service file. Fixed missing bot intents --- bot.py | 5 ++++- lostark_bot.service | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lostark_bot.service diff --git a/bot.py b/bot.py index 61fc842..a982626 100644 --- a/bot.py +++ b/bot.py @@ -18,7 +18,10 @@ subs = json.loads(data) la_servers = {} -client = discord.Client() +intents = discord.Intents.default() +intents.message_content = True + +client = discord.Client(intents=intents) def get_servers_status(): print("Getting servers", end = " ") diff --git a/lostark_bot.service b/lostark_bot.service new file mode 100644 index 0000000..9f36fef --- /dev/null +++ b/lostark_bot.service @@ -0,0 +1,16 @@ +[Unit] +Description=Lost Ark Server Status Discord Bot +After=network.target multi-user.target + +[Service] +Restart=always +RestartSec=1 +User=pi +WorkingDirectory=/root/lostark_bot +ExecStart=/usr/bin/python3 /root/lostark_bot/bot.py +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=LostArkBot + +[Install] +WantedBy=multi-user.target