- Python 3.12 + discord.py - Docker + docker-compose - Forgejo Actions CI (lint + test) - Cog system with /hello example - deploy.sh for auto-deployment
22 lines
765 B
Python
22 lines
765 B
Python
import discord
|
|
from discord import app_commands
|
|
from discord.ext import commands
|
|
|
|
|
|
class Hello(commands.Cog):
|
|
def __init__(self, bot: commands.Bot):
|
|
self.bot = bot
|
|
|
|
@app_commands.command(name="hello", description="Salut de la part de Vision Studio !")
|
|
async def hello(self, interaction: discord.Interaction):
|
|
embed = discord.Embed(
|
|
title="Vision Studio",
|
|
description="Salut ! Je suis **Vision Studio**, ton bot Discord.\n\nUtilise `/help` pour voir les commandes disponibles.",
|
|
color=discord.Color.blue(),
|
|
)
|
|
embed.set_footer(text="Vision Studio v1.0")
|
|
await interaction.response.send_message(embed=embed)
|
|
|
|
|
|
async def setup(bot: commands.Bot):
|
|
await bot.add_cog(Hello(bot))
|