Skip to content

Instantly share code, notes, and snippets.

View SnowyJaguar1034's full-sized avatar

SnowyJaguar1034 SnowyJaguar1034

View GitHub Profile

A Definitive Guide to Self-hosting Modmail

Setup
  1. Fork the repo (Best to make it private).
  2. Define a Procfile in the root of the directory and fill the contents with worker: python3 launcher.py.
  3. Create a new app on Heroku and deploy the repo you've just forked.
  4. Go to "elements" and install the PostgresQL and Redis add-ons to your new app.
@SnowyJaguar1034
SnowyJaguar1034 / Zupie-Events.md
Created April 2, 2022 21:42
This is a gist of what I already have loggers for in my private bot, Some if not all of these will be ported over to Zupie.

I will start off saying that some parts of these events use third party libs on my private bot (the buttons are a good example of this). I would prefer to create buttons using discord.py's buttons for Zupie.

Bot Joins Guild

@commands.Cog.listener()
async def on_guild_join(self, guild):
  self.bot.prom.guilds_join.inc({})
  embed = discord.Embed(title = "Server Join", description = f"{guild.name} ({guild.id})", colour = 0x00FF00, timestamp = datetime.datetime.utcnow(),)
  guilds = sum(await self.bot.comm.handler("guild_count", self.bot.cluster_count))
  embed.set_footer(text = f"{guilds} servers")