A discord bot inspired by the amazing Arch Wizard of the Crimson Wizard Clan, Megumin! From the anime, Konosuba.
The bot was built off of discord.js.
Thanks for checking out my repo.
If you have any suggestions on making this project any better I'd appreciate it.
Please create an issue if something wrong happens.
- Grab a recent post from the r/Megumin subreddit NOTE: Randomly selected from the 50 most recent posts
- Using the selenium module for python to extract quotes from animecharactersdatabase
- Being able to set up a custom prefix so it doesn't potentially interfere with other bots. NOTE: Only works with select ASCII characters. The alphabet, punctuation, and numbers.
- Custom prefix has character limit of 20
- If you are hosting the bot, there is a log of all messages that go through the channel/guild
- Other small stuff
- js
- python
-
Node.JS (v8.11.3) [https://nodejs.org/en/]
-
discord.js v(11.3.2) [https://discord.js.org/#/]
-
node-fetch (v2.1.2) [https://www.npmjs.com/package/node-fetch]
-
bufferutil (v4.0.0) [https://www.npmjs.com/package/bufferutil]
-
µWS (v10.148.1) [https://www.npmjs.com/package/uuws]
-
ChromeDriver (v2.40) [http://chromedriver.chromium.org/downloads]
-
Selenium (v3.13.0) [https://www.seleniumhq.org/projects/webdriver/]
-
is-image-url (v1.1.8) [https://github.com/wzbg/is-image-url]
-
reddit [https://www.reddit.com/r/Megumin/]
-
Megumin explosions gif [https://gfycat.com/DaringUncommonGrosbeak]
-
Megumin profile image [https://www.deviantart.com/mrtapoz-kun/art/Minimalist-Wallpaper-Megumin-Konosuba-625673584]
- Install Node.JS
- Clone/Download repository
- Inside directory, use ubuntu terminal.
sudo npm install
to install dependencies - Go to https://discordapp.com/developers/applications
- Create an application
- Navigate to the
Bot
section located in the sidebar - Copy your bot token
- Set a profile pic (The one I used is linked above under resources)
- Go to config folder and create a file with the name
token.json
{
'token': 'paste token here'
}
- Paste the above into your
token.json
file. - Invite your bot to discord using this link: https://discordapi.com/permissions.html NOTE: Make sure you copy your client ID which can be found under
general information
where you got your token. - Navigate to the directory in your ubuntu terminal and run
node src/index.js
- If a season three of Konosuba does come out, make sure to run the python script to update the current list of Megumin quotes. Since I'm a beginner and I don't know much about webscraping, a chrome window will open and proceed to look through the website. Make sure you have chrome installed on your computer
13.5. The owner of the anime character database recently hooked me up with this: https://www.animecharactersdatabase.com/api.php?srt_lines=1&cid=75490 . If anyone wants to, they can implement this to the script rather than web scraping.
-
I use the Prettier code formatter for js (default settings from atom-beautify).
-
I use the Pretty Diff code formatter for html (default settings from atom-beautify).
-
I use the autoPEP 8 code formatter for python. It functions under python.org's PEP 8 rules. (default settings from atom-beautify).