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 lancer par: "+str(ctx.message.author))
#Commande dis
async def dis(self, ctx, *, something):
"""Un mode peroquet"""
await self.bot.say(something)
print("Commande dis lancer par: "+str(ctx.message.author)+" argument: "+str(something))
#Commande flash
async def flash(self, ctx, *, something):
"""Fait apparaitre un text siblimiquement"""
await self.bot.delete_message(ctx.message)
print("Commande flash lancer par: "+str(ctx.message.author)+" argument: "+str(something))
#Commande indirect
async def say(self, ctx, *, something):
"""Fait passer un message indirectement"""
await self.bot.say("**{} said:** {}".format(str(ctx.message.author), something))
print("Commande say lancer par: "+str(ctx.message.author)+" argument: "+str(something))
def setup(bot):
bot.add_cog(DefaultCMD(bot))
print("DefaultCMD charger")