From 88a2f121532f23c7102318ce1a2ea67c15d6d985 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Mon, 10 Mar 2025 17:30:58 +0100 Subject: [PATCH] Initialisation de bot pour Battle4Suisse --- .gitignore | 5 +++++ bot.py | 18 ++++++++++++++++++ requirements.txt | 1 + 3 files changed, 24 insertions(+) create mode 100644 .gitignore create mode 100644 bot.py create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8eac53d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +__pycache__ + +.venv/ + +config.py diff --git a/bot.py b/bot.py new file mode 100644 index 0000000..e077673 --- /dev/null +++ b/bot.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import discord +from discord.ext import commands + +from config import * + + +intents = discord.Intents.default() +intents.message_content = True + +bot = commands.Bot(command_prefix='$', intents=intents) + +@bot.command() +async def test(ctx): + await ctx.send("Hello world!") + +bot.run(DISCORD_TOKEN) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..844f49a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +discord.py