-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommandes.py
More file actions
40 lines (29 loc) · 1023 Bytes
/
Copy pathcommandes.py
File metadata and controls
40 lines (29 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import discord
from discord.ext import commands
from dotenv import load_dotenv
import os
load_dotenv()
token = os.getenv('DISCORD_TOKEN')
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)
bot = commands.Bot(command_prefix="$", intents=intents)
@bot.command(name="bonjour_monde", aliases=['hw', 'hellow_word'])
async def hello_world(context):
await context.send("Hello, World!")
@bot.command()
async def decompte(context, delai: int):
await context.send("Départ dans ...")
for i in range(delai, 0, -1):
await context.send(i)
await context.send("c'est parti")
@bot.command(
description="Repète du texte qu'on lui passe",
brief= "Répéte du texte",
help= "Encore plus d'aide"
)
# '*' ce symbole permet de prendre le contenu de tout le message si dans ce message il y a des espaces
async def repeter(context, *, message):
await context.send(message)
if __name__ == '__main__':
bot.run(token=token)