Discord Bot for counting. Allows arithmetic expressions.
https://arithmetica.xyz/
Your average counting bot. Except you can count with arithmetic expressions!
Wiki: https://arithmetica.xyz/wiki
The link above will invite a bot hosted by me that uses the latest version of this repo.
Alternatively you can host the bot yourself. Instructions below ⏬
- Set a counting channel via slash commands
- Count normally (
1, 2, 3, 4
) - Count with arithmetic expressions (
5^0, sqrt(4), i^2+4, log(10000, 10)
) - Slash commands
- Arithmetic is toggleable
- Toggleable Math-Only mode (counting only using arithmetic expressions)
- Cooldown for new server members
- Timeout for losers
- Timeout increment factor for every fail
- Timed role for losers
- Cheat-Mode (no losing)
-
/help
command to get a list of all commands and useful information -
/stats
command for personal stats or the stats of another user -
/global-stats
command to see how other servers are doing (filter by current and all time best) -
/best
command to see the best count of the server so far -
/top
command for a leaderboard, sortable by counts or fails -
/calc
command to calculate arithmetic expressions (and see if they are a valid count) -
/info
command to get information about the bot and an invite link -
/math-facts
command to get a random math fact -
/oeis
command to look up a sequence on the OEIS - LaTeX Rendering engine
/tex
- Wolfram Alpha integration
/ask
- Code execution engine using
/run
- Multi-language support (Can be set on every Discord server individually)
- English (Peer reviewed ✅)
- German (Peer reviewed ✅)
- French (Peer reviewed ✅)
- Spanish (Peer reviewed ✅)
- Russian (Peer reviewed ✅)
- Japanese (Peer reviewed ✅)
- Easy to set up (view
/admin-help
)- Set the channel and you're good to go (
/set-channel
) - Optionally, set server language (
/set-language
) (Default: English) - Optionally, disable/enable/force the use of arithmetic (
/toggle-arithmetic
) (Default: Enabled) - Optionally. set a timeout for losers (
/set-timeout
) (Default: Disabled) - Optionally, set a cooldown for new server members (
/cooldown
) (Default: 60 minutes) - Optionally, set a timeout increment factor (
/timeout-increment
) (Default: Disabled) - Optionally, enable cheat mode (
/cheat-mode
) (Default: Disabled) - Optionally, set a loser role (
/set-loser-role
) (Default: None) - Optionally, set the last count e.g. if you migrate from another bot (
/set-last-count
) (Default: 0)
- Set the channel and you're good to go (
- Easy to self-host
- No external database needed
- Easy configuration system
- Install instructions provided below
- Admin only commands
- Prevent persons from counting multiple times in a row
- Ban and unban users from counting
- Handle counts deleted by the user
- Sharding
Feature request or discovered a bug? Please open an Issue here on GitHub.
The bot requires the following permissions:
- Send Messages: To send messages in the counting channel
- Manage Messages: To delete messages in the counting channel
- Read Messages/View Channels: To read messages in the counting channel
- Add Reactions: To add reactions to messages in the counting channel
- Embed Links: To send embeds
- Moderate Members: To timeout users when a timeout is set for losers
- Manage Webhooks: To create webhooks for users when a message is deleted in the counting channel
- View Audit Log: To see who invited the bot in order to send them a setup guide
- Manage Channels: To create a counting channel if it doesn't exist yet
Website: https://arithmetica.xyz
Repository: https://github.com/NullDev/arithmetica.xyz
TOS: https://arithmetica.xyz/tos/
Privacy: https://arithmetica.xyz/privacy/
- Open up your favourite terminal (and navigate somewhere you want to download the repository to).
- Make sure you have NodeJS installed (>= v20.0.0). Test by entering
$node -v
If this returns a version number, NodeJS is installed. If not, get NodeJS here. - Clone the repository and navigate to it. If you have Git installed, type
$git clone https://github.com/NullDev/Arithmetica-Bot.git && cd Arithmetica-Bot
If not, download it here and extract the ZIP file.
Then navigate to the folder. - Install all dependencies by typing
$npm install
- Copy config/config.template.js and paste it as
config/config.custom.js
OR usenpm run generate-config
. - Configure it in your favourite editor by editing
config/config.custom.js
. - [LINUX ONLY]: Install LaTeX dependencies:
$sudo ./setup_latex.sh
- Start it in development mode by running
$npm start
or start in production mode
$npm run start:prod
or (recommended), use PM2
$pm2 start pm2.ecosystem.json
Once the config has been copied like described in Step 4, it can be changed to your needs:
Config Key | Description | Data Type | Default value |
---|---|---|---|
discord: bot_token |
Auth Token of the Discord bot. Can be created here. | String | N/A |
discord: dbl_token |
OPTIONAL: DiscordBotList token to push commands and stats. | String | N/A |
discord: top_token |
OPTIONAL: Top.gg token to push stats. | String | N/A |
discord: discords_list_token |
OPTIONAL: Discords List token to push stats. | String | N/A |
discord: botlist_token |
OPTIONAL: Botlist token to push stats. | String | N/A |
discord: dlist_token |
OPTIONAL: Dlist token to push stats. | String | N/A |
discord: vote_webhook_secret |
OPTIONAL: Secret for the vote webhook. | String | N/A |
discord: wolfram_appid |
OPTIONAL: Secret for the Wolfram-Aplha API. | String | N/A |
discord: bot_owner_ids |
OPTIONAL: Discord IDs of Bot owners | String-Array | [] |
discord: total_shards |
Total shard count | number , "auto" , undefined | "auto" |
http: port |
Port for fastify vote route | number | 1335 |
Made with contrib.rocks.