Skip to content

mfnalex/discord-logger

Repository files navigation

Simple Discord bot to log a server's messages to a channel. This is useful if you have lots of channels and never know where a message came from when you hear the annoying discord notification sound.

img/img.png

Building

./gradlew build

Running

From command line

Run the .jar using Java 8 or newer and specify your bot token and the channel id you want to log to.

java -jar discord-logger.jar -b <bot-token> -c <channel-id>

Systemd service

Create a systemd service file, e.g. /etc/systemd/system/discord-logger.service:

[Unit]
Description=Discord Logger
After=network.target

[Service]
Type=simple
User=nobody
group=nogroup
ExecStart=/usr/bin/java -jar <path-to-discord-logger.jar> -b <bot-token> -c <channel-id>
Restart=always
RestartSec=5s
RuntimeMaxSec=86400

[Install]
WantedBy=multi-user.target

After that, enable the service:

systemctl daemon-reload
systemctl start discord-logger

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages