Skip to content

Instantly share code, notes, and snippets.

View No767's full-sized avatar

Noelle Wang No767

View GitHub Profile
@No767
No767 / 01-free-hosting-bad.md
Last active April 5, 2024 12:03
Explanation of why free hosts for Discord bots are bad

Why Free Hosting is Bad

Contact Noelle for any concerns or questions with this gist

When looking for hosting your bot, free services and/or providers that claim to support hosting Discord Bots. Do not use them. Why? Let me explain.

The Drawbacks

Free hosts are providers who specialize in offering an free platform to host projects.

@No767
No767 / 01-primer.md
Last active February 24, 2024 23:55
Asyncpg integration with discord.py examples

Asyncpg examples with discord.py

This gist goes over how asyncpg can be integrated with discord.py. In addition with the example, this document also serves as an explanation on some design decisions for who are interested.

Contact

Please contact noellieuwu on the discord.py server if you are interested in contributing to changes or have

Auto Syncing Sucks

This Gist This gist explains why Auto Syncing Sucks and ways you can manually sync instead.

Context

Slash commands are special commands that are registered by Discord instead. Unlike prefixed commands, which are handled internally by the library, libraries need to send the commands to Discord through the Discord API. In discord.py, this is done through a process called syncing.

@No767
No767 / from_orm_to_sql.md
Last active July 4, 2023 11:15
From ORM to SQL

From ORM to SQL

All of my major discord bots from the start has used an database, which is PostgreSQL. And I was first introduced to the world of databases through ORMs like SQLAlchemy and many others. But having tried ORMs ranging from SQLAlchemy to Prisma, I have really concluded that throughout this whole entire time, I didn't really need an ORM. I just needed to learn SQL for once.

The beginning

I had always seen SQL as a very complex and interlocking language, so much that I spent every single excuse

@No767
No767 / dropping-alpine-linux-support.md
Last active December 24, 2022 08:57
Dropping support for Alpine Linux for Kumiko and Akari

Dropping Alpine Linux Support for Kumiko and Akari

This gist is meant to explain why Alpine Linux is being dropped from support for Docker images for both Kumiko, and Akari. When choosing the base image for Docker for Kumiko and Akari, Alpine Linux was first used. (first introduced to me by Ellie). Alpine's main selling point is simple: smaller image sizes, and better security. But Alpine comes with a catch. Alpine Linux uses musl (different implementation of the C stdlib for Linux) and busybox, while distros like Debian, Ubuntu, Arch, etc all use glibc and coreutils (GNU Core Utilities). Often times this doesn't play well with Python, and any languages that extensively use C/C++.

Alpine build times are often 50-100x slower compared to Debian

One of the biggest issues why I've decided to move away from Alpine Linux is the insane bui

@No767
No767 / docker-deployment-guide.md
Last active October 23, 2022 19:38
docker-deployment-guide

Docker Deployment Guide for Discord Bots

This guide is intended to help with folks who wish to deploy their Discord bots using Docker. This guide is specifically made for bots using discord.py or pycord (or any fork of discord.py), but the concepts can be applied to other bots as well. (will be different for bots written in C#, Java, Go, Rust, C++, etc)

@No767
No767 / the-future-of-rin.md
Last active August 4, 2022 03:53
The Future of Rin

The Future of Rin

Well everyone, it was a really fun time working on Rin. Rin was my first major Python project. And in fact, it was my first actual programming project. I started Rin around 1 year ago. In hopes of creating a Discord bot that would do so much more. As Rin was being developed, Rin's codebase got more and more mature. And I started to learn more and more about Discord bot development, asyncio, and Python in general. Around a couple months in developing Rin, I started Kumiko, which is supposed to be the better version of Rin. And even though Kumiko's codebase isn't as mature as Rin's, it has seen so much growth. I know I can't keep on adding APIs after APIs to Rin. And believe it or not, the process of adding one is extremely boring. So this leaves us with the question in mind: What's the Future of Rin?

Moving Onwards

My life is pretty busy. As a HS student, I have to tend to multiple responsibilities. I am going to be an captain and a core leader within my robotics team, FRC 5507. I have

The Current State of Rin and Kumiko

TD;LR, Kumiko is not dead

Rin and Kumiko have been projects I have been working on for a long long time. And unfortunately, I may or may not have the time to commit to the amount of work that is needed for these projects. Both Rin and Kumiko are OSS, which means you are using it for $0, and No767 doesn't own you anything. Kumiko has updates stalled by Rin, since Rin V2 will be releasing fairly soon. It's been a very massive undertaking for me to handle these, and along with like 3 other projects + APs + other stuff. So TD;LR, Kumiko is not dead. Rin may stop getting updates once all of the APIs are done being intergrated, and work will start on Kumiko. Ultimately, I see Kumiko as the successor to Rin; better in every way possible and catered towards the general audience and non tech savy people