diff --git a/main.py b/main.py index 10ef5f8..7b3858a 100644 --- a/main.py +++ b/main.py @@ -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 @@ -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): @@ -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) @@ -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): diff --git a/src/ctxcommands/ctxholamundo.py b/src/ctxcommands/ctxholamundo.py new file mode 100644 index 0000000..3579149 --- /dev/null +++ b/src/ctxcommands/ctxholamundo.py @@ -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') \ No newline at end of file