irokemr

eliminar comando !help por defecto

Jun 28th, 2021 (edited)
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. import discord
  2. from discord.ext import commands
  3.  
  4.  
  5. bot = commands.Bot(command_prefix='!', description="ayuda bot") #Comando
  6. bot.remove_command("help") # Borra el comando por defecto !help
  7.  
  8.  
  9. @bot.command()
  10. async def hola(ctx): #Comando a decir
  11.     await ctx.send('Qué tal estas?') #Mensaje que dira el bot
  12.  
  13.  
  14. #Cuándo Ejecutes el comando en discord !hola, el bot dira Qué tal estas?
  15.  
  16.  
  17.  
  18. @bot.event
  19. async def on_ready():
  20.     print("BOT listo!")
  21.    
  22.  
  23.    
  24. bot.run('TU TOKEN AQUÍ') #OBTEN UN TOKEN EN: https://discord.com/developers/applications
Add Comment
Please, Sign In to add comment