No description
  • JavaScript 98.8%
  • Dockerfile 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2024-12-26 16:17:28 +00:00
config move .env and data.json to config folder 2024-06-22 15:28:58 +00:00
.gitignore move .env and data.json to config folder 2024-06-22 15:28:58 +00:00
bad.json update 2023-05-10 22:37:26 -04:00
bun.lockb move to bun from npm 2024-12-26 16:17:27 +00:00
Dockerfile move to bun from npm 2024-12-26 16:17:27 +00:00
good.json modified: data.json 2023-12-06 17:12:17 +00:00
index.js clear old commands 2024-10-04 06:27:13 -04:00
LICENSE Create LICENSE 2022-11-16 19:21:08 -08:00
package.json move to bun from npm 2024-12-26 16:17:27 +00:00
README.md Merge branch 'main' of https://github.com/0xGingi/CCP-Social-Credit-discord 2024-12-26 16:17:28 +00:00

CCP-Social-Credit-discord

A simple bot that mocks the CCP's Social credit system. - Now rewritten in Javascript!

DISCLAIMER: The terms in the "good" and "bad" field here are meant to mock the CCP and in no way reflect the views of the author

Docker

mkdir ~/ccp (We need a path for .env and data.json so it's persistent)
docker pull 0xgingi/ccp-social-credit-discord:latest
docker run -d --name ccp --restart=always -v ~/ccp:/app/config 0xgingi/ccp-social-credit-discord:latest

Installation:

curl -fsSL https://bun.sh/install | bash
git clone https://github.com/0xGingi/CCP-Social-Credit-discord
cd CCP-Social-Credit-discord
bun install

Add Your Discord Bot Secret Token and your Discord ID:

(To get your Discord ID, enable developer mode in advanced settings then right click your name and copy ID)

cd config
mv .example.env .env
nano .env 

Now invite the discord bot to your server and give basic permissions needed to read/send messages

node index.js

Systemd service to autostart bot

sudo nano /etc/systemd/system/china.service
[Unit]
Description=social credit score

[Service]
Type=simple
Restart=always
User=user
Group=user
WorkingDirectory=/home/user/CCP-Social-Credit-discord
ExecStart=/usr/bin/node /home/user/CCP-Social-Credit-discord/index.js

[Install]
WantedBy=multi-user.target

Replace user and group with your username and change the workingdirectory and execstart with your locations

sudo systemctl enable --now china