Because other counting bots suck™
Find a file
swee 741979e229
All checks were successful
Create Docker image / deploy (push) Successful in 52s
Update README.md
2025-04-10 23:51:28 -07:00
.forgejo/workflows Update .forgejo/workflows/docker.yml 2025-04-07 14:51:03 -07:00
.gitignore Initial commit 2025-02-25 17:21:44 -08:00
bot.py Update bot.py 2025-03-29 13:26:27 -07:00
Dockerfile Update Dockerfile 2025-03-28 23:57:17 -07:00
LICENSE Initial commit 2025-02-25 17:21:44 -08:00
README.md Update README.md 2025-04-10 23:51:28 -07:00

SimpleCounterGuilded

Because other counting bots suck™

How do I fucking run this bot?

Running this bot is so simple, you run this one-liner command

TOKEN=token CHANNEL=id python3 bot.py

Get the token from the bot controls bullshit, it's that fucking simple

Get the channel id from the fucking URL, or clicking "Copy Link" when you right-click your counting fuckery

https://www.guilded.gg/***/groups/********/channels/********-****-****-****-************/chat
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                   This is the fucking channel ID, don't forget to fucking remove the fucking "/chat"

How do I run it all the time?

I only know how to do so that linux (fuck the windows bullshit) so I will show you how to do it in Linux

Create a file in /lib/systemd/systemd/counter.service

[Unit]
Description=A simple fucking counter bot in Guilded
After=network-online.target

[Service]
ExecStart=python3 /home/user/SimpleCounterGuilded/bot.py
User=user
Environment="TOKEN=token"
Environment="CHANNEL=id"
[Install]
WantedBy=default.target

Remember to replace the token and channel id from what I showed above

And then fucking run:

sudo systemctl enable --now counter

And BOOM! Your bullshit now runs all the fucking time and will run again when you turn your server on again

Hey! What about Docker?

Ok I think docker is good to use to not deal with all this shit, so use this docker compose file

services:
  counter:
    image: git.swee.codes/swee/simplecounterguilded:latest
    restart: unless-stopped
    environment:
      - CHANNEL=id
      - TOKEN=token
    volumes:
      - ./cache_count:/app/cache_count

If you want to use multiple channels and servers, you can go ahead and copy the whole thing except services and change the name and change the environment variables, like this

services:
  oneserver:
    image: git.swee.codes/swee/simplecounterguilded:latest
    restart: unless-stopped
    environment:
      - CHANNEL=id
      - TOKEN=token
    volumes:
      - ./count_oneserver:/app/cache_count
  anotherserver:
    image: git.swee.codes/swee/simplecounterguilded:latest
    restart: unless-stopped
    environment:
      - CHANNEL=other_id
      - TOKEN=other_or_same_token
    volumes:
      - ./count_anotherserver:/app/cache_count

Remember to change the volume names for the cached counts

It'll be easier if you name each one as the server name