Getting started
Let use this library!
Before getting started...
Install
pip install --upgrade discord-componentsSend buttons
from discord_components import DiscordComponents, ComponentsBot, Button
bot = ComponentsBot(command_prefix = "your prefix")
"""
or you can just override the methods yourself
bot = discord.ext.commands.Bot("!")
DiscordComponents(bot)
"""
@bot.event
async def on_ready():
print(f"Logged in as {bot.user}!")
@bot.command()
async def button(ctx):
await ctx.send(
"Hello, World!",
components = [
Button(label = "WOW button!", custom_id = "button1")
],
)
bot.run("your token")
Responding to the interaction

Send selects

Now code!
Last updated