Skip to content

Instantly share code, notes, and snippets.

View AXVin's full-sized avatar
🎯
Focusing

AXVin AXVin

🎯
Focusing
View GitHub Profile
@AXVin
AXVin / hotreload.py
Last active March 8, 2024 16:43
Cog for reloading extensions as they are edited
import os
import pathlib
import discord
from discord.ext import commands, tasks
# put your extension names in this list
# if you don't want them to be reloaded
IGNORE_EXTENSIONS = []
@AXVin
AXVin / slashcommands.py
Created April 9, 2021 14:25
Cog that allows you to have slash commands in d.py
from enum import Enum
import discord
from discord.ext import commands
BASE_URL = "https://discord.com/api/v8"
class InteractionResponseType(Enum):
pong = 1
@AXVin
AXVin / redis-ipc.py
Created May 14, 2021 05:22
A 2 way ipc using redis ipc with a single consumer and multiple unknown producers
import json
import secrets
import asyncio
import aioredis
NONCE_BYTES = 8
class IPC: