Skip to content

Instantly share code, notes, and snippets.

View voidoak's full-sized avatar
🎯
Focusing

voidoak_ voidoak

🎯
Focusing
View GitHub Profile
@voidoak
voidoak / tutorial.md
Last active April 23, 2024 12:24
Implementing your own help command in discord.py

Custom Help Command in discord.py

If you've ever built a bot, you've probably wanted to create a custom help command so it will present your commands and their features in exactly the manner you'd like. Perhaps you don't like the default help command, with its simple code block formatting and presenting all the commands, split up into different messages if you have a good amount of them. Perhaps you've seen other developers' custom help commands, but don't want or like to use embed fields. Well in that case, you can easily create and design your own help command to handle the output exactly the way you want it.

To do so, we'll be implementing a helpful base class that comes packaged in discord.py; namely, commands.HelpCommand. There are other help command base classes, but we'll be focusing on

@simmsb
simmsb / eval.py
Last active January 30, 2024 05:39
A good eval for discord.py
import ast
import discord
from discord.ext import commands
def insert_returns(body):
# insert return stmt if the last expression is a expression statement
if isinstance(body[-1], ast.Expr):
body[-1] = ast.Return(body[-1].value)
@Tommyfoxy2
Tommyfoxy2 / RSS to Webhooks.md
Last active December 6, 2023 06:44
Simple Zapier RSS to Discord webhook(s)

This tutorial is based on a realworld example


1) Initial Setup

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send content to

  2. In the settings for that channel, Click the Webhooks tab and create a new webhook. Webhook

@nowl
nowl / perlin.c
Created February 15, 2011 19:04
Perlin Noise in C
#include <stdio.h>
static int SEED = 0;
static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40,
185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204,
9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81,
70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13,
203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41,
164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105,