Skip to content

Instantly share code, notes, and snippets.

I've been running QuoteBot for nearly four years now, and to be honest, I’m tired. Due to some recent health complications and major life events, I’ve decided this is the end of the line for QuoteBot.

While QuoteBot is one of the best things I’ve ever done, it’s time to sunset it. Here’s some reasons I’ve decided to let it go:

  • QuoteBot is not the same small bot it once was, it needs larger servers to run off. These servers cost nearly $20 USD per month. At the moment, I need to keep as much money as possible
  • You might’ve noticed you can’t add QuoteBot to any more servers. This is because Discord have blocked QuoteBot’s verification, and they aren’t accepting my ID to continue verifying QuoteBot
  • The support server doesn’t really do much any more, I rarely get people joining, and it’s even rarer people message
  • It’s just not a fun or interesting project any more

While I’m sad to see the end of this, I feel it’s time to move on with my life, and I’m grateful for everything that came from it. The experie

@comhad
comhad / mybot.service
Last active September 21, 2024 16:24
How to setup a systemctl service for running your bot on a linux system
[Unit]
Description=My discord bot service
After=network.target
[Service]
ExecStart=/usr/bin/python3 mybot.py
WorkingDirectory=/home/user/bots/mybot
StandardOutput=inherit
StandardError=inherit
Restart=always
@comhad
comhad / _webhooks.md
Last active June 19, 2021 20:50
Implementing discord bot listing webhooks using a dedicated server exposed to the internet / VPS

Flask app for webhooks

Most discord bot listings use webhooks as a method of telling you who upvoted your bot, to recieve these webhooks, you need to have some kind of web server that's able to process them, if you don't have a dedicated web server that you can expose to the internet, you can read how to do this using other services here.

This method of recieving webhooks is generally easier to manage since you are recieving the data directly, however you need to remember that this is a web server and it will require the same security as if you were running any other site / API. The code below by default returns 403 errors if the token provided in the Authorization header is not correct or if header does not exist, you can use this in a firewall to determine if someone is trying to access it. (This returns a 403 for this event only, and does not stop people brute forcing for pages, or attempting a DoS attack)

There will be some variables for you to modify in the

@comhad
comhad / _webhooks.md
Last active December 19, 2022 13:05
How to make discord bot listing webhooks without a dedicated server

Vote Webhooks

A vote webhook is a pre-defined URL that a POST request is made to containing information about a user that upvoted a bot (in JSON format) and an Authorization header. It's fired whenever a user upvotes a bot, it contains some various information about what user upvoted and some extra information like if this vote counted as double because it was the weekend, and if the user who upvoted was a site admin.

You may have issues with this soloution if you get over 500 upvotes per month, intergromat only allows so many operations to take place on a free account. Scroll down for details.

This tutorial is going to focus on discordbotlist for now, but by looking at the docs for other sites, you can find how the webhooks work (though you may need to create a second webhook on your side). This tutorial is going to use integromat to host webhooks. You can use github to make an account. (This tutorial assumes you have no experience with