Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from src.ctxcommands.ctxbirras import birrasfunctx
from src.ctxcommands.ctxfulbo import fulbofunctx
from src.ctxcommands.ctxhelp import helpfunctx
from src.ctxcommands.ctxholamundo import holamundofunctx
from src.ctxcommands.ctxkarma import karmarankfunctx, karmawordfunctx, karmagiversfunctx, karmagiversuserfunctx
from src.ctxcommands.ctxquote import quotefunctx, qsearchfunctx, quoteaddfunctx
from src.ctxcommands.ctxsubte import subtefunctx
Expand Down Expand Up @@ -305,7 +306,7 @@ async def on_reaction_remove(reaction, user):

# Funcion de manejo de error cuando el argumento es None
# (usuario manda el comando sin parametros requeridos, como por ejemplo en !clima o !fulbo)
# Excepto para !help que tiene su propio mensaje si el comando va vacio
# Excepto para !help y !holamundo que tiene su propio mensaje si el comando va vacio

@bot.event
async def on_command_error(ctx, error):
Expand All @@ -323,6 +324,12 @@ async def on_command_error(ctx, error):
# Log
print(FechaActual)
print ("Se ha ejecutado el comando !help")

elif ctx.command.name == "holamundo":
await holamundofunctx(ctx)
# Log
print(FechaActual)
print ("Se ha ejecutado el comando !holamundo")

elif ctx.command.name == "caucho":
await cauchofunctx(ctx)
Expand Down Expand Up @@ -633,6 +640,11 @@ async def on_message(message):
async def help(ctx, texto):
await helpfunctx(ctx, texto)

# COMANDO HOLAMUNDO
@bot.command()
async def holamundo(ctx, texto):
await holamundofunctx(ctx, texto)

# COMANDO CLIMA
@bot.command()
async def clima(ctx, ciudad):
Expand Down
22 changes: 22 additions & 0 deletions src/ctxcommands/ctxholamundo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import discord
from datetime import datetime
from discord.ext import commands



async def holamundofunctx(ctx, texto):
FechaActual = datetime.now()

mensajebienvenida = """Bienvenido a la comunidad. Acá tenés un resumen de los canales disponibles en IRC de Sysarmy:
#sysarmy-gaming: Este canal es para discutir de gaming y llamar al call to action respecto a tetr.io sin inundar #sysarmy con la pasión del apilado de bloques.
#sysarmy-help: Este canal tiene el RSS de help.sysarmy.com y ademas se puede usar para preguntas.
#sysarmy-memes: Este canal es solo para postear memes.
#sysarmy-offtopic: El canal donde sgoico y nachi pasan productos 4 o 5 octogonos a probar.
#sysarmy-timba: No tomes nada de lo que se diga aquí como un consejo financiero. Asesorate con profesionales y hacé tu propia investigación.
#sysarmy-yelling: UNA MANERA MUY SATISFACTORIA DE EXPRESAR TU FRUSTRACIÓN Y UNA GRAN LECTURA PARA LOS DEMÁS TAMBIÉN. SOLO CAPS/MAYÚSCULAS.
Mas detalles en el canal #help-bot-commands de Discord, dentro de la seccion de Welcome! - o ejecutando /help desde Discord"""
await ctx.send(mensajebienvenida)

# Log
print(FechaActual)
print (f'Se ha ejecutado el comando !holamundo')