{"id":16974746,"url":"https://github.com/nulldev/arithmetica-bot","last_synced_at":"2025-04-12T01:21:42.538Z","repository":{"id":166311493,"uuid":"641718515","full_name":"NullDev/Arithmetica-Bot","owner":"NullDev","description":"Discord Bot for counting. Allows arithmetic expressions.","archived":false,"fork":false,"pushed_at":"2025-04-03T11:38:11.000Z","size":3812,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T12:32:21.108Z","etag":null,"topics":["arithmetic","bot","counting","discord","discord-bot","discord-js","nulldev"],"latest_commit_sha":null,"homepage":"https://arithmetica.xyz/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NullDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-17T03:00:35.000Z","updated_at":"2025-04-03T11:38:07.000Z","dependencies_parsed_at":"2023-06-09T02:30:22.946Z","dependency_job_id":"efbda3b1-433c-4820-a228-52a5f87ec419","html_url":"https://github.com/NullDev/Arithmetica-Bot","commit_stats":{"total_commits":351,"total_committers":7,"mean_commits":"50.142857142857146","dds":0.06267806267806264,"last_synced_commit":"1cd58952700fa057b31b66a7ce91c3f59435bcab"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FArithmetica-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FArithmetica-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FArithmetica-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NullDev%2FArithmetica-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NullDev","download_url":"https://codeload.github.com/NullDev/Arithmetica-Bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501867,"owners_count":21114687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arithmetic","bot","counting","discord","discord-bot","discord-js","nulldev"],"created_at":"2024-10-14T01:07:53.139Z","updated_at":"2025-04-12T01:21:42.529Z","avatar_url":"https://github.com/NullDev.png","language":"JavaScript","readme":"# Arithmetica-Bot\n[![NullDev/DiscordJS-Template](https://img.shields.io/badge/Template%3A-NullDev%2FDiscordJS--Template-green?style=flat-square\u0026logo=github)](https://github.com/NullDev/DiscordJS-Template) [![cd](https://github.com/NullDev/Arithmetica-Bot/actions/workflows/cd.yml/badge.svg)](https://github.com/NullDev/Arithmetica-Bot/actions/workflows/cd.yml) [![ESLint](https://github.com/NullDev/Arithmetica-Bot/actions/workflows/eslint.yml/badge.svg)](https://github.com/NullDev/Arithmetica-Bot/actions/workflows/eslint.yml) [![License](https://img.shields.io/github/license/NullDev/Arithmetica-Bot?label=License\u0026logo=Creative%20Commons)](https://github.com/NullDev/Arithmetica-Bot/blob/master/LICENSE) [![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/NullDev/Arithmetica-Bot?logo=Cachet)](https://github.com/NullDev/Arithmetica-Bot/issues?q=is%3Aissue+is%3Aclosed)\n\n\u003cp align=\"center\"\u003e\u003cimg height=\"250\" width=\"auto\" src=\"https://arithmetica.xyz/img/img.png\" /\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003cb\u003eDiscord Bot for counting. Allows arithmetic expressions.\u003cbr\u003ehttps://arithmetica.xyz/\u003c/b\u003e\u003c/p\u003e\n\u003chr\u003e\n\n## :question: What does it do?\n\nYour average counting bot. Except you can count with arithmetic expressions!\n\nWiki: https://arithmetica.xyz/wiki\n\n\u003chr\u003e\n\n## :satellite: Invite the bot\n\n[![Invite](https://img.shields.io/badge/Invite-37a779?style=for-the-badge)](https://discordapp.com/oauth2/authorize?client_id=1108279646165942363\u0026scope=bot\u0026permissions=1100048526544)\n\n\u003csub\u003eThe link above will invite a bot hosted by me that uses the latest version of this repo. \u003cbr\u003e\nAlternatively you can host the bot yourself. Instructions [below ⏬](#wrench-setup) \u003c/sub\u003e\n\n\u003chr\u003e\n\n## :star: Features\n\n- [x] Set a counting channel via slash commands\n- [x] Count normally (`1, 2, 3, 4`)\n- [x] Count with arithmetic expressions (`5^0, sqrt(4), i^2+4, log(10000, 10)`)\n- [x] Slash commands\n- [x] Arithmetic is toggleable\n- [x] Toggleable Math-Only mode (counting only using arithmetic expressions)\n- [x] Cooldown for new server members\n- [x] Timeout for losers\n- [x] Timeout increment factor for every fail\n- [x] Timed role for losers \n- [x] Cheat-Mode (no losing)\n- [x] `/help` command to get a list of all commands and useful information\n- [x] `/stats` command for personal stats or the stats of another user\n- [x] `/global-stats` command to see how other servers are doing (filter by current and all time best)\n- [x] `/best` command to see the best count of the server so far\n- [x] `/top` command for a leaderboard, sortable by counts or fails\n- [x] `/calc` command to calculate arithmetic expressions (and see if they are a valid count)\n- [x] `/info` command to get information about the bot and an invite link\n- [x] `/math-facts` command to get a random math fact\n- [x] `/oeis` command to look up a sequence on the [OEIS](https://oeis.org/)\n- [x] LaTeX Rendering engine `/tex`\n- [x] Wolfram Alpha integration `/ask`\n- [x] Code execution engine using `/run`\n- [x] Multi-language support (Can be set on every Discord server individually)\n    - English (Peer reviewed ✅)\n    - German (Peer reviewed ✅)\n    - French (Peer reviewed ✅)\n    - Spanish (Peer reviewed ✅)\n    - Russian (Peer reviewed ✅)\n    - Japanese (Peer reviewed ✅)\n- [x] Easy to set up (view `/admin-help`)\n    - Set the channel and you're good to go (`/set-channel`)\n    - Optionally, set server language (`/set-language`) (Default: English)\n    - Optionally, disable/enable/force the use of arithmetic (`/toggle-arithmetic`) (Default: Enabled)\n    - Optionally. set a timeout for losers (`/set-timeout`) (Default: Disabled)\n    - Optionally, set a cooldown for new server members (`/cooldown`) (Default: 60 minutes)\n    - Optionally, set a timeout increment factor (`/timeout-increment`) (Default: Disabled)\n    - Optionally, enable cheat mode (`/cheat-mode`) (Default: Disabled)\n    - Optionally, set a loser role (`/set-loser-role`) (Default: None)\n    - Optionally, set the last count e.g. if you migrate from another bot (`/set-last-count`) (Default: 0)\n- [x] Easy to self-host\n    - No external database needed\n    - Easy configuration system\n    - Install instructions provided [below](#wrench-setup)\n- [x] Admin only commands\n- [x] Prevent persons from counting multiple times in a row \n- [x] Ban and unban users from counting\n- [x] Handle counts deleted by the user\n- [x] Sharding\n\n\u003chr\u003e\n\n## :diamond_shape_with_a_dot_inside: Feature requests \u0026 Issues\n\nFeature request or discovered a bug? Please [open an Issue](https://github.com/NullDev/Arithmetica-Bot/issues/new/choose) here on GitHub.\n\n\u003chr\u003e\n\n## :lock: Permissions\n\nThe bot requires the following permissions:\n\n- Send Messages: To send messages in the counting channel\n- Manage Messages: To delete messages in the counting channel\n- Read Messages/View Channels: To read messages in the counting channel\n- Add Reactions: To add reactions to messages in the counting channel\n- Embed Links: To send embeds\n- Moderate Members: To timeout users when a timeout is set for losers\n- Manage Webhooks: To create webhooks for users when a message is deleted in the counting channel\n- View Audit Log: To see who invited the bot in order to send them a setup guide\n- Manage Channels: To create a counting channel if it doesn't exist yet\n\n\u003chr\u003e\n\n## 🤖 DBL \u0026 Top.gg\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://discordbotlist.com/bots/arithmetica\"\u003e\u003cimg src=\"https://discordbotlist.com/api/v1/bots/1108279646165942363/widget\"\u003e\u003c/a\u003e\u0026nbsp;\u0026nbsp;\n\u003ca href=\"https://top.gg/bot/1108279646165942363\"\u003e\u003cimg src=\"https://top.gg/api/widget/1108279646165942363.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr\u003e\n\n## 🌐 Website \u0026 Repo\n\nWebsite: https://arithmetica.xyz \u003cbr\u003e\nRepository: https://github.com/NullDev/arithmetica.xyz\n\nTOS: https://arithmetica.xyz/tos/ \u003cbr\u003e\nPrivacy: https://arithmetica.xyz/privacy/\n\n\u003chr\u003e\n\n## :wrench: Setup\n\n0. Open up your favourite terminal (and navigate somewhere you want to download the repository to). \u003cbr\u003e\u003cbr\u003e\n1. Make sure you have NodeJS installed (\u003e= v20.0.0). Test by entering \u003cbr\u003e\n$ `node -v` \u003cbr\u003e\nIf this returns a version number, NodeJS is installed. **If not**, get NodeJS \u003ca href=\"https://nodejs.org/en/download/package-manager/\"\u003ehere\u003c/a\u003e. \u003cbr\u003e\u003cbr\u003e\n2. Clone the repository and navigate to it. If you have Git installed, type \u003cbr\u003e\n$ `git clone https://github.com/NullDev/Arithmetica-Bot.git \u0026\u0026 cd Arithmetica-Bot` \u003cbr\u003e\nIf not, download it \u003ca href=\"https://github.com/NullDev/Arithmetica-Bot/archive/master.zip\"\u003ehere\u003c/a\u003e and extract the ZIP file.\u003cbr\u003e\nThen navigate to the folder.\u003cbr\u003e\u003cbr\u003e\n3. Install all dependencies by typing \u003cbr\u003e\n$ `npm install`\u003cbr\u003e\u003cbr\u003e\n4. Copy [config/config.template.js](https://github.com/NullDev/Arithmetica-Bot/blob/master/config/config.template.js) and paste it as `config/config.custom.js` OR use `npm run generate-config`. \u003cbr\u003e\u003cbr\u003e\n5. Configure it in your favourite editor by editing `config/config.custom.js`. \u003cbr\u003e\u003cbr\u003e\n6. [LINUX ONLY]: Install LaTeX dependencies: \u003cbr\u003e\n$ `sudo ./setup_latex.sh` \u003cbr\u003e\u003cbr\u003e\n7. Start it in development mode by running \u003cbr\u003e\n$ `npm start` \u003cbr\u003e\nor start in production mode \u003cbr\u003e\n$ `npm run start:prod` \u003cbr\u003e\nor (recommended), use PM2 \u003cbr\u003e\n$ `pm2 start pm2.ecosystem.json` \u003cbr\u003e\u003cbr\u003e\n\n\u003chr\u003e\n\n## :nut_and_bolt: Configuration\n\nOnce the config has been copied like described in [Step 4](#wrench-setup), it can be changed to your needs:\n\n| Config Key | Description | Data Type | Default value |\n| ---------- | --------- | ------------------ | ------------ |\n| discord: \u003cbr\u003e `bot_token` | Auth Token of the Discord bot. Can be created [here](https://discordapp.com/developers/). | String | N/A |\n| discord: \u003cbr\u003e `dbl_token` | OPTIONAL: [DiscordBotList](https://discordbotlist.com/) token to push commands and stats. | String | N/A |\n| discord: \u003cbr\u003e `top_token` | OPTIONAL: [Top.gg](https://top.gg/) token to push stats. | String | N/A |\n| discord: \u003cbr\u003e `discords_list_token` | OPTIONAL: [Discords List](https://discords.com/) token to push stats. | String | N/A |\n| discord: \u003cbr\u003e `botlist_token` | OPTIONAL: Botlist token to push stats. | String | N/A |\n| discord: \u003cbr\u003e `dlist_token` | OPTIONAL: Dlist token to push stats. | String | N/A |\n| discord: \u003cbr\u003e `vote_webhook_secret` | OPTIONAL: Secret for the vote webhook. | String | N/A |\n| discord: \u003cbr\u003e `wolfram_appid` | OPTIONAL: Secret for the Wolfram-Aplha API. | String | N/A |\n| discord: \u003cbr\u003e `bot_owner_ids` | OPTIONAL: Discord IDs of Bot owners | String-Array | [] |\n| discord: \u003cbr\u003e `total_shards` | Total shard count | number , \"auto\" , undefined | \"auto\" |\n| http: \u003cbr\u003e `port` | Port for fastify vote route | number | 1335 |\n\n\u003chr\u003e\n\n## :octocat: Contributors\n\n\u003ca href=\"https://github.com/NullDev/Arithmetica-Bot/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=NullDev/Arithmetica-Bot\u0026v=1\" /\u003e\n\u003c/a\u003e\n\n\u003csub\u003eMade with [contrib.rocks](https://contrib.rocks).\u003c/sub\u003e\n\n\u003chr\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulldev%2Farithmetica-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnulldev%2Farithmetica-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnulldev%2Farithmetica-bot/lists"}