Skip to content

Instantly share code, notes, and snippets.

@mudkipdev
mudkipdev / slash_commands.py
Last active June 2, 2023 04:28
A basic slash command example for discord.py v2.x.
from discord.ext import commands
from discord import app_commands
import discord
intents = discord.Intents.default()
intents.message_content = True # Ignore this line if you're not using prefix commands.
# You could use a client here instead, if you don't want to use prefix/hybrid commands.
bot = commands.Bot(intents=intents, command_prefix="!")
@mudkipdev
mudkipdev / pagination.py
Last active August 13, 2023 19:04
A discord.py embed pagination system using buttons.
from discord.ext import commands
import discord
import asyncio
__all__ = ("Paginator",)
class Paginator:
def __init__(
self,