Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
FTW-Bot/DefaultCMD.py
flifloo d69f55caa5 Fautes d'orthographe, gitignore & default_config
Correction des fautes d'orthographe (merci WORMS !), ajout d'un fichier dans le gitignore et mise a jour du default_config.
2018-03-15 10:21:52 +01:00

41 lines
1.4 KiB
Python

import discord
from discord.ext import commands
class DefaultCMD:
def __init__(self, bot):
self.bot = bot
#Commande ping
@commands.command(pass_context=True)
async def ping(self, ctx):
"""La commande la plus stupide de se bot"""
await self.bot.say("Pong!")
print("Commande ping lancée par: "+str(ctx.message.author))
#Commande dis
@commands.command(pass_context=True)
async def dis(self, ctx, *, something):
"""Un mode peroquet"""
await self.bot.say(something)
print("Commande dis lancée par: "+str(ctx.message.author)+" argument: "+str(something))
#Commande flash
@commands.command(pass_context=True)
async def flash(self, ctx, *, something):
"""Fait apparaitre un text siblimiquement"""
await self.bot.delete_message(ctx.message)
print("Commande flash lancée par: "+str(ctx.message.author)+" argument: "+str(something))
#Commande indirect
@commands.command(pass_context=True)
async def say(self, ctx, *, something):
"""Fait passer un message indirectement"""
await self.bot.say("**{} said:** {}".format(str(ctx.message.author), something))
await self.bot.delete_message(ctx.message)
print("Commande say lancée par: "+str(ctx.message.author)+" argument: "+str(something))
def setup(bot):
bot.add_cog(DefaultCMD(bot))
print("DefaultCMD chargée")