|
1 |
| -# bot |
| 1 | +# Counting |
| 2 | +A highly customizable counting bot created by [numselli](https://github.com/numselli/). |
| 3 | + |
| 4 | +[Privacy Policy](https://counting.numselli.xyz/privacy) - [Support Server](https://counting.numselli.xyz/support) |
| 5 | + |
| 6 | + |
| 7 | +## Before you continue (Notice on Open Source status of Counting) |
| 8 | +The code in this repository contains a slimmed down version of my [counting bot](https://counting.numselli.xyz/). This version of the bot is intended to be used in a small number of guilds and has some functionality removed most notably: |
| 9 | +- Voting to earn saves |
| 10 | +- Website |
| 11 | +- API |
| 12 | +- All [premium](https://counting.numselli.xyz/premium) features |
| 13 | + |
| 14 | +There are two important expectations to set for self-hosting this bot: |
| 15 | +- Expect limited support in the support server due to the complexities of self-hosting. |
| 16 | +- Expect braking changes in all releases. I will try to minimize breaking changes, but I am primarily focusing on the main bot where I have full control over the effects of my changes. |
| 17 | + |
| 18 | +Using this code for personal use is acceptable however monetizing this project is not, if you do wish to monetize this code please reach out to me on discord (`numselli#6964`). |
| 19 | +If you would like to give back to the project consider making a pull request, [donating](https://www.paypal.com/paypalme/numselli), or [subscribing to a premium plan](https://counting.numselli.xyz/premium). |
| 20 | + |
| 21 | +\- numselli Counting Maintainer |
| 22 | + |
| 23 | +## Installing and Setup |
| 24 | +The following steps will help you get Counting up and running on your computer. |
| 25 | +1. Install Prerequisites |
| 26 | + - Install [Docker](https://docs.docker.com/engine/install/) and [Docker compose](https://docs.docker.com/compose/install/) |
| 27 | + - Clone this repository to the system you want to run the bot |
| 28 | + ``` |
| 29 | + git clone https://github.com/counting-bot/bot.git |
| 30 | + ``` |
| 31 | + - [Create a new discord bot](https://www.xda-developers.com/how-to-create-discord-bot/#how-to-create-and-add-a-discord-bot-to-your-server). **Make sure you have MESSAGE CONTENT INTENT under Privileged Gateway Intents enabled.** |
| 32 | +2. Create docker volumes |
| 33 | + 1. Make two directories |
| 34 | + - static |
| 35 | + - database |
| 36 | + - cache |
| 37 | + 2. Modify and run the following three commands |
| 38 | + - ``` |
| 39 | + docker volume create --driver local \ |
| 40 | + --opt type=non \ |
| 41 | + --opt o=bind\ |
| 42 | + --opt device=/<PATH OF STATIC DIR>\ |
| 43 | + CountingStatic |
| 44 | + ``` |
| 45 | + - ``` |
| 46 | + docker volume create --driver local \ |
| 47 | + --opt type=non \ |
| 48 | + --opt o=bind\ |
| 49 | + --opt device=/<PATH OF DATA BASE DIR>\ |
| 50 | + CountingDB |
| 51 | + ``` |
| 52 | + - ``` |
| 53 | + docker volume create --driver local \ |
| 54 | + --opt type=non \ |
| 55 | + --opt o=bind\ |
| 56 | + --opt device=/<PATH OF CACHE DIR>\ |
| 57 | + cache |
| 58 | + ``` |
| 59 | +3. Copy and edit the config file |
| 60 | + - Copy `settings.example.mjs` into the static folder that you made in step 2 |
| 61 | + - Replace `726515812361437285` with your discord userid |
| 62 | + - Replace `TOKEN_HERE` with the discord bots token |
| 63 | +4. Run the bot |
| 64 | + - Open this repository in a terminal of your choosing and run |
| 65 | + ``` |
| 66 | + sudo docker-compose up -d |
| 67 | + ``` |
| 68 | +5. Invite the bot to your server using this link (remember to replace `726560538145849374` with your bot's id) `https://discord.com/oauth2/authorize?client_id=726560538145849374&permissions=3136&scope=bot%20applications.commands` |
| 69 | +6. Link a counting channel using the `/linkchannel` command |
| 70 | +
|
| 71 | +## License |
| 72 | +This repository is licensed under the [Commons Clause License](https://commonsclause.com/). Monetized use of this repository is strictly disallowed. |
0 commit comments