Qubitz is an uwubot and a music bot with custom emoji uploading capability, the ability to find people by their roles, and connectivity to The Cat API just for fun.
I began developing an uwubot named Bitz for Discord in June 2020, in discord.js because the first guides I found were in JavaScript. This turned out to be very misguided, because (as I realized when our AP Computer Science Principles teacher taught us Python and the basics of discord.py later that year) discord.py is far superior. Over the summer of 2020, I developed and hosted both bots on my Chromebook. Sometime or other I also spun up another discord.py bot, Amicitia, to help students in a university Discord server find people with the same major (majors being roles).
I've wanted to translate Bitz's uwubot functionalities to Python for a while, and I finally did, almost two years later. Bitz, the original uwubot I created, has been translated to Python and conflated with Quartz's capabilities to form Qubitz.
Development of Qubitz is stagnant. I only update when I don't have homework and want to fix a breaking change.
Qubitz's functionalities include:
.p[lay] <search term>
: Streams the first YouTube result in vc..np
: Displays the current song..q[ueue]
: Displays the song queue..rm <some song>
: Removes the specified song from the queue..skip
: Skips the currently playing song..stop
: Disconnects Qubitz from vc.
.l[ist]
: Lists each role and everyone in them..f[ind] <some role>
: Prints a list of everyone with the specified role..p[ing]
: Pokes Qubitz to see if they're awake..up[time]
: Displays how long Qubitz has been awake..i[nfo] ("all")
: Displays guild and channel information, and if "all" is given as an argument, then displays guild member information as well.
.create <emoji_name>
: Sets attached image as a custom server emoji with the given name..uwu[ify] <something>
: Uwuifies your message, deleting the command message..echo <something>
: Echoes back your message, deleting the command message..c[at]
: Shows a cat from The Cat API.
To set Qubitz up locally, you'll need python3
and the packages for discord
,
requests
, and aiohttp
.
You'll also need an API token, which you get by creating an application in your Discord developer portal. Click the subheading "bot" in the menubar on the left and add a bot, and a secret token will have been generated under the bot's username.
Create a file called env.py
with this as its contents:
TOKEN = "your-token-here-between-quotes"
In the developer portal again, under Bot, enable the server members and message content intents. Under OAuth2 > URL Generator, generate an invite link by selecting the "bot" scope and adding the following permissions:
- Read Messages / View Channels
- Send Mesages
- Manage Messages
- Embed Links
- Attach Files
- Use External Emojis
- Add Reactions
Then you can run Qubitz with python3 index.py
(or nodemon --exec python3 index.py
).
- aiohttp documentation, especially this comparison between aiohttp and requests
- discord.js guide
- Getting user input
- Adding more commands
- Creating embeds
- Some basic es6 syntax examples
- Dynamically executing commands
- Miscellaneous examples, including playing music from YouTube and retrieving emoji characters from another file created in the same directory as index.js
- How to create a music bot (Free Code Camp)
- Adding a config file
(An Idiot's Guide) โ This was helpful for conceptualizing the flow of order
when the bot is running under
nodemon
. Using a config file taught me how the config file responds to calls from the index file. - And, of course, places where people before me have asked questions:
- Get a picture from a message (Stack Overflow)
- Take file as argument (Stack Overflow)
- Discord bot send attachments (Reddit): pointed me to aiohttp
- Using nodemon with python3 (Stack Overflow)
- Eric Yeung's Discord music bot (GitHub)
- discord.py documentation, particularly:
- Cog documentation
- Coggification example (Stack Overflow)
- Voice client documentation
- Cog documentation
Bitz was named by my close friend Tumega500#1234.
Released under GNU GPL v3.