{"id":21804995,"url":"https://github.com/brutalbeard/brutal-discord","last_synced_at":"2025-04-13T19:33:27.400Z","repository":{"id":42204587,"uuid":"142034353","full_name":"Brutalbeard/brutal-discord","owner":"Brutalbeard","description":"A fun, educational Discord Bot","archived":false,"fork":false,"pushed_at":"2025-03-24T12:58:41.000Z","size":587,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T10:12:27.533Z","etag":null,"topics":["bot","discord","discord-bot","discord-bots","discord-js","discord-js-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Brutalbeard.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":"2018-07-23T15:34:38.000Z","updated_at":"2025-02-09T17:18:01.000Z","dependencies_parsed_at":"2023-02-06T07:31:55.094Z","dependency_job_id":"ab17effc-a7f7-4e85-905a-196894904f7e","html_url":"https://github.com/Brutalbeard/brutal-discord","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutalbeard%2Fbrutal-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutalbeard%2Fbrutal-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutalbeard%2Fbrutal-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brutalbeard%2Fbrutal-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brutalbeard","download_url":"https://codeload.github.com/Brutalbeard/brutal-discord/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248768201,"owners_count":21158596,"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":["bot","discord","discord-bot","discord-bots","discord-js","discord-js-bot"],"created_at":"2024-11-27T11:57:45.238Z","updated_at":"2025-04-13T19:33:27.375Z","avatar_url":"https://github.com/Brutalbeard.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brutal-Discord\n\nTo add to your discord\nchannels, [click right here](https://discord.com/api/oauth2/authorize?client_id=168727946834608128\u0026permissions=0\u0026scope=applications.commands%20bot)\n.\n\n[![Codacy Security Scan](https://github.com/Brutalbeard/brutal-discord/actions/workflows/codacy.yml/badge.svg)](https://github.com/Brutalbeard/brutal-discord/actions/workflows/codacy.yml)\n\n## About\n\nI was using [Lita](lita.io) for creating and managing my chat bots, however, since I was mostly\nusing [Discord](discordapp.com), I was somewhat limited. If I wanted to use a Discord specific feature, like an embed, I\nwas ruining my Lita plugin's abillity to stay agnostic and work for other Lita users.\n\nSo, to [discord.js](https://github.com/discordjs/discord.js) I went! Get the of JS, written\nin [Typescript](typescriptlang.org), all hosted on [Heroku](heroku.com). Update: Heroku was bein a pain in my ass. Just\nusing my Raspberry Pi now.\n\nI added on a [Mongo Database](mongodb.com) to keep track of events, polls, and user info. I tried out\nusing [Redis](redis.io) when using Lita, but it was a pain in the ass. I used [MongoDB](https://mongodb.com/) for my db.\nIt's free version is plenty of power for this app.\n\nI'm always happy to have fellow devs check out the app, and make pull requests and all that. Fork, and send over a pull\nrequest at your leisure.\n\n## Installation\n\nApplication runs on the [Node JS](nodejs.org) framwork, so you'll need that installed. For an editor, I'm a big fan\nof [VS Code](https://code.visualstudio.com), but any popular editor should do.\n\n```\n$ git clone https://github.com/Brutalbeard/brutal-discord\n$ cd brutal-discord\n```\n\nThen install all dependencies using npm or yarn\n\n```\nnpm install\n```\n\nThis should install all the dependencies the app needs onto your computer.\n\nYou'll need to make copy of the ```env_example``` file, fill it in with all your information, and rename it\nto ```.env```.\n\n* [Giphy](https://developers.giphy.com)\n* [Discord Bot](https://discordapp.com/developers/applications/)\n* [APOD](https://api.nasa.gov/api.html#apod)\n* Mongo is a different beast. I'm not gonna try to talk anyone through it here. Long story shortest, you need to create\n  a mongodb that's hosted somewhere in the universe, and then put a bunch of login credentials. I used just the connect\n  URI that was provided with the db, just to make life a little more simple.\n\nOnce you've got all that in place, you need to ensure that Typescript is compiling the ```src``` folder in the strictly\ntype Javascript, that's put into the ```build``` folder. Node will run everything from the build folder. You comile\nusing the command ```tsc```. There's also an option to \"watch\" for file changes and auto compile\nagain. ```tsc --watch```.\n\n## Running the App\n\nOnce you've compiled and put in all your ```.env``` stuff, you can spin up the app by going to the app's root directory,\nopening up terminal and running. As of the most recent verion of DiscordJS, you need to run with node version 16.\n[NVM](https://github.com/nvm-sh/nvm) is great for bouncing back and forth between node versions.\n\n```\n$ node .\n```\n\nYou'll get some happy text in the terminal letting you know it's up and running. I'm only logging errors in the console,\nso you won't see much else.\n\n## Writing New Commands\n\nYou'll edit everything in the ```/src``` folder. Don't edit the stuff in ```/build``` or you'll go insane.\n\n```/src/index.ts``` runs the show. It's based off the guide supplied by discord.js. Works great, didn't feel like\nmessing with it. I *did* get a Typescript error when adding commands to the ::Client class. I had to just add an\n`//@ts-ignore` to get rid of it.. It was just cause I'm crazy pendantic and didn't want to see the squiggly line. Runs\nfine regardless.\n\nTo make a new command, you'll toss that into `/src/commands/`. Copy `ud.ts` and use that as a nice little template.\nReplace the name and description and what not.\n\n## Database Interactions\n\nI'm using the [Mongodb Node Driver](http://mongodb.github.io/node-mongodb-native/) for all my db interactions.\n\nI considered switching over to Mongoose, but I used Typescript definitions in the ```/src/definitions``` folder already,\nso I didn't see the point in making the switch.\n\n## Acknowledgements\n\n* [discord.js](https://github.com/discordjs/discord.js)\n* [Node JS](nodejs.org)\n* [Typescript](typescriptlang.org)\n* [Mongo Database](mongodb.com)\n* [Giphy](https://developers.giphy.com)\n* [Discord Bot](https://discordapp.com/developers/applications/)\n* [APOD](https://api.nasa.gov/api.html#apod)\n* [dotenv](https://github.com/motdotla/dotenv)\n* [LucasLeandro1204](https://github.com/LucasLeandro1204/Pornsearch)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutalbeard%2Fbrutal-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrutalbeard%2Fbrutal-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutalbeard%2Fbrutal-discord/lists"}