Skip to content

Latest commit

 

History

History
112 lines (89 loc) · 3.54 KB

File metadata and controls

112 lines (89 loc) · 3.54 KB

SkarmBot

Features

  • Maintains databases and notifies subscribed channels about new releases of the following comics:
    • XKCD
    • Work Chronicles
  • Notifies users when someone says their name (or nickname, or otherwise brings up a topic of interest)
  • Notifies channels of events including members joining and leaving, bans, and username/nickname changes
  • Keeps track of server activity, and present the data for those interested in tidbits such as "the most common words that people say"
  • Holds conversations with users; "learns" based on chat history (hilarity ensures)
  • Sings songs, participate in Skyrim LARPs, and quote Douglas Adams with the best of them
  • Keeps chat colorful by randomizing the appearance of selected roles periodically
  • Rewards server members with roles based on activity in a server (as configured by server moderators)

Getting Started

Running Skarm as a Linux Service

mkdir /srv/skarm
cd /srv/skarm
git clone https://github.com/DragoniteSpam/SkarmBot.git

sudo nano /etc/systemd/system/skarm.service

Inside of Nano, write:

[Unit]
Description=Skarmbot
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=10
User=YOUR_USERNAME_GOES_HERE
ExecStart=/usr/bin/pwsh /srv/skarm/SkarmBot/launcher.ps1 live

# Allow exit by e!exit over status code 42
RestartPreventExitStatus=42

[Install]
WantedBy=multi-user.target

Next, set up the local environment variables:

sudo systemctl edit skarm

Add the following:

[Service]
Environment="BACKUP_PATH=/path/to/your/backups"

Start the service by running

sudo systemctl enable skarm

Service Control Commands

sudo systemctl status skarm
sudo systemctl start skarm
sudo systemctl restart skarm
sudo systemctl stop skarm
journalctl -u skarm.service # read log
journalctl -u skarm.service -f # follow real-time log

Getting Linux to play nice with Node

# https://nodejs.org/en/download/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

\. "$HOME/.nvm/nvm.sh"

Setting up gh

sudo apt update
sudo apt install gh

# Validate that it worked
gh pr list -s merged -L 2300

# Restart the service to include those commands
sudo systemctl restart skarm

Adding Skarmbot to a Server

Skarmbot is hosted by the developers and can simply be added to a discord server with the link below.
Ask your Server Administrators to add Skarm to your favorite server today!