Skip to content

Instantly share code, notes, and snippets.

View Fatih5252's full-sized avatar
💭
Scootkit = Scooter

Fatih Simsek Fatih5252

💭
Scootkit = Scooter
View GitHub Profile
@Fatih5252
Fatih5252 / bot.py
Last active December 26, 2023 14:57
how to make slash commands on discord (discord.py)
import discord
from discord.ext import app_commands
intents = discord.Intents.default()
client = aclient()
tree = app_commands.CommnadTree(client)
@tree.command(name = "hello", description = "say hello!", guild = discord.Object(id = SERVER ID))
async def self(interaction: discord.Interaction, name: str)
await interaction.response.send_message(f"Hello {name}!", ephemeral = True)
@Fatih5252
Fatih5252 / prefix.py
Created December 26, 2023 15:34
prefix command
# pip install discord.py
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.message_context = True
bot = commands.Bot(command_prefix="!", intents=intents)
@bot.command()