{"id":27004791,"url":"https://github.com/asyncjake/beatbattlebot","last_synced_at":"2025-04-04T06:23:47.461Z","repository":{"id":45348180,"uuid":"306941487","full_name":"asyncjake/beatbattlebot","owner":"asyncjake","description":"Util bot for handling beat battle submissions, sessions, and maybe more","archived":false,"fork":false,"pushed_at":"2024-08-31T22:59:15.000Z","size":899,"stargazers_count":3,"open_issues_count":46,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T19:25:30.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asyncjake.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":"2020-10-24T17:59:32.000Z","updated_at":"2025-03-02T23:36:12.000Z","dependencies_parsed_at":"2024-02-18T02:32:20.469Z","dependency_job_id":"7a40cc69-297c-4a39-9a6f-83f20b24794c","html_url":"https://github.com/asyncjake/beatbattlebot","commit_stats":null,"previous_names":["asyncjake/beatbattlebot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncjake%2Fbeatbattlebot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncjake%2Fbeatbattlebot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncjake%2Fbeatbattlebot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyncjake%2Fbeatbattlebot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asyncjake","download_url":"https://codeload.github.com/asyncjake/beatbattlebot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247130289,"owners_count":20888558,"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":[],"created_at":"2025-04-04T06:23:46.919Z","updated_at":"2025-04-04T06:23:47.450Z","avatar_url":"https://github.com/asyncjake.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beat Battle Bot - Discord.js Music Helper\n### [Ideas and Suggestions Welcome!](https://github.com/jakethedev/beatbattlebot/issues)\n\n## About beatbattlebot\n\nThis is a discord bot for managing beat battles, or really any other community-oriented song\ncontests. If you're a discord mod/admin and you're looking for an always-updated guide, you\ncan [check it out here](https://gist.github.com/jakethedev/82865525164fb7fc64117751611bf597)\n\n### Features\n\n- Per-channel battles with submissions and submission deadlines\n- Voter registration and vote submission (optional, after a submission deadline)\n- Submission viewing for contestants, voting results for moderators\n- Gift exchange functionality as the result of a Sample Pack Secret Santa held in 2020\n- Novelty functions such as coin flipping and decision making\n\n## Running the bot\n\nYou can run the bot locally with `npm i; npm run devbot` and a Discord bot token, which\ncan be acquired at [this link](https://discordapp.com/developers/applications/me). For\nthose that want to set up a private instance, this bot is set up to be easy to run with\nsystemd, check the service dir for some templates and a unit file.\n\nTo see a current list of available commands, run `!help` in a bot channel or as a DM to the bot\n\n## Development\n\nInstall Node.js 12+, fork this project, npm install, set up an app token (see 'Running the Bot'),\nadd the token to a NEW file at `.token.json` in the project root, then invite the bot to a\nserver for testing.\n\n'npm start' will run the bot in the foreground, 'npm run devbot' will run a hot-reloading bot\ninstance, and 'npm test' should run quietly with no issues if everything's set up correctly.\n'npm run verbosetest' will show you the npm test output, which should look like\nDiscord-formatted responses.\n\nNote: battlecache.test.json may be helpful for testing, just `cp` it to battlecache.json, rename\nSERVER_CHANNEL1 and DIFFSERVER_CHANNEL to names appropriate for your server\n(e.g. \"$servername\\_$botchannelname\", this should change to ID though: #23)\n\n### Expectations and how it loads\n\nThe bot is set up to load a list of local libs, grab every exported function, and drop the\nfunctions + a bit of metadata into a global commander object. That said, this means it calls\nall functions exactly the same way - and if you need more parameters for some reason, perhaps\nwe should chat. For your new commands to drop in and immediately work, they must have the\nfollowing signature: `f(input:String, message:discord.js#message, client:discord.js#client)`\n- input will be everything after your commands name in the message to the bot\n(like '!commandname input is all this stuff'), the message will be the full message object\n[per the Discord.js api](https://discord.js.org/#/docs/main/stable/class/Message), and the\nclient is [from Discord.js too](https://discord.js.org/#/docs/main/stable/class/Client).\n\n## Writing new commands\n\nIf you just want to just *add a relevant command* to a library, you only need *step 4*.\nBut if you have commands to add that don't seem to fit with the theme of functions in a\nparticular file, follow all of these steps to add a new library folder to the bot:\n\n1. Find an appropriate place to put your command - if one exists, skip to step 4, otherwise make a new directory\n2. Add your new directory to the MODULES array in bot.js\n3. Copy index.js from discordlib or gravemind into your new lib as a handy piece of boilerplate\n4. Write exported functions in your library (Note: The bot ignores the default export!)\n5. Update the index.js in your library so it loads a file you create in your new lib\n6. Run it! You've now added functionality to the bot!\n\n## Development triage:\n\n### ImportError: no module compiler.ast:\n\nIf you see the above issue during 'npm install', just run 'sudo apt install python-dev'\n\n### Other Issues\n\nIf you run into other problems, click the link at the top of this readme to report an issue\nand we can discuss the issue in the comments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyncjake%2Fbeatbattlebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasyncjake%2Fbeatbattlebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyncjake%2Fbeatbattlebot/lists"}