commit 053e3a6552a4372b8b163b778b6dff7552b6bdae Author: binlab Date: Fri Sep 22 16:07:16 2023 +0000 se viene diff --git a/cmds.txt b/cmds.txt new file mode 100644 index 0000000..cf4c9da --- /dev/null +++ b/cmds.txt @@ -0,0 +1,47 @@ +triste https://c.tenor.com/3VwAiLgRhXsAAAAC/tilldcwn-seal.gif https://media.tenor.com/rD4KDir7lO0AAAAC/sad-pikachu.gif https://media.tenor.com/rZzVLbacIygAAAAC/sad-wifey.gif https://media.tenor.com/r5zhQDxOrfsAAAAC/lagrimas-burbuja.gif https://media.tenor.com/DFrMQQbVyDwAAAAC/whaaat-sadness.gif https://media.tenor.com/kski4r8ZZ7YAAAAC/crying-cry.gif https://media.tenor.com/FsuzVwvsu2kAAAAd/tigger-tigger-winnie-the-pooh.gif https://media.tenor.com/gMf28mdhknAAAAAC/triste-hora-de-aventura.gif https://media.tenor.com/XGTslE4y-TgAAAAC/grookey-pokemon.gif https://media.tenor.com/1FoW_O57RzcAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/Fakx3ddIXIcAAAAC/inazuma-eleven-ina11.gif + +feliz https://c.tenor.com/pNjz6uu8QDYAAAAd/foca-seal.gif https://c.tenor.com/1IMoSGd3FS4AAAAC/seal-sax.gif https://media.tenor.com/io08Dwo4zYkAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/T4g83yrAhwcAAAAC/totodile-pokemon.gif https://media.tenor.com/TxSphhvxHPQAAAAC/sleep.gif https://i.giphy.com/media/4ZzAxcE4XZ0be/giphy.webp https://media.tenor.com/_BDOcoulrPMAAAAd/pokemon.gif https://media.tenor.com/URDuyDEug2AAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/e96B5RAWHusAAAAC/inazuma-eleven-ina11.gif https://tenor.com/view/angry-baby-the-incredibles2-angry-temper-bad-gif-15418418 + +focaraid https://c.tenor.com/Vz2o4t4ien4AAAAC/seal.gif + +girar https://c.tenor.com/M67VmLlocdMAAAAC/spinning-seal.gif https://media.tenor.com/ajy28aoovO8AAAAd/inazuma-eleven-wii.gif https://media.tenor.com/pnU_h3vpZBEAAAAC/homer-simpson-twister.gif https://media.tenor.com/HbtBxeXWOWsAAAAC/spin-record.gif https://media.tenor.com/gabMJozKmfsAAAAC/luigi-spin.gif https://media.tenor.com/GYCI3ucysgIAAAAi/minecraft-spinning.gif https://media.tenor.com/INM9wVoIhf0AAAAi/fox-reverse.gif https://media.tenor.com/vtzIFx9gECcAAAAC/spin-snow-golem.gif https://media.tenor.com/t5fpt8VevjoAAAAC/chair-spin-spin-chair.gif + +love https://c.tenor.com/aWQdCKo1uHoAAAAd/seal-hug.gif https://c.tenor.com/4KYmaDejhpwAAAAd/baby-seal-snuggle.gif https://media.tenor.com/DNT565tOkA0AAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/HAOZTi25tsQAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/kCZjTqCKiggAAAAC/hug.gif https://media.tenor.com/neBINvIQMJMAAAAC/monsters-inc-boo.gif https://media.tenor.com/OfxypGLm5v4AAAAC/monsters-inc-pixar.gif https://media.tenor.com/dFI4OPz6_LcAAAAC/contrato-rias-x-issei.gif https://media.tenor.com/5V9Fo_AoXKoAAAAC/anime-hug-micchon-shikimori.gif https://media.tenor.com/HgMqC5oRxXYAAAAC/harry-potter-sirius-black.gif https://media.tenor.com/PyNYnhL9hY8AAAAC/funny-animals-cute.gif https://media.tenor.com/9flNuoGx5GoAAAAd/seal-seal-kiss.gif https://media.tenor.com/ePa-MtAM7nkAAAAM/baby-seal.gif + +correr https://c.tenor.com/WXP2qCxozv0AAAAd/seal-running-away.gif https://media.tenor.com/HF2cigibuvsAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/9xh8yDbW55wAAAAC/nathan-swift-kazemaru.gif https://media.tenor.com/YM6Hp_wjpn0AAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/pqZyv8WKV7wAAAAC/inazuma-eleven-ina11.gifhttps://media.tenor.com/IQohwdlzeVAAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/510wpbR9DFMAAAAC/teletubbies-dipsy.gif https://media.tenor.com/53DPTJCxAg4AAAAC/baby-run.gif https://media.tenor.com/3zP3GPHiPA4AAAAC/hahaha-run.gif https://media.tenor.com/mRt-KVWqjQYAAAAM/forrest-gump-running.gif https://media.tenor.com/9-lcsbILDqcAAAAM/munchlax-pokemon.gif https://media.tenor.com/-rQuaJaRmFUAAAAC/pokemon-run-serena-pokemon.gif https://media.tenor.com/cbxxSVjwSMAAAAAC/riolu-running.gif https://media.tenor.com/ETLImY9T0QQAAAAC/charmander-help.gif https://media.tenor.com/d2UV-SQEq_wAAAAC/mine-hungry.gif + +focasueño https://c.tenor.com/ro6Ux7Wb9YAAAAAC/animal-seal.gif + +aplausos https://c.tenor.com/ALKC7g6vP8MAAAAC/funny-animals-seal.gif https://media.tenor.com/BCZb5mOO80QAAAAd/the-wolf-of-wall-street-clap.gif https://media.tenor.com/J2ntclXAgnwAAAAd/aplaudiendo-risto-mejide.gif https://media.tenor.com/lxEzXKG1VgsAAAAC/clapping-clap.gif https://media.tenor.com/VfkjtootVu8AAAAd/clapping-palmas.gif https://media.tenor.com/AVKXBs5934YAAAAd/dumbledore-clapping.gif https://media.tenor.com/3LiPFA_dMygAAAAC/aplausos.gif https://media.tenor.com/JH_DCd4VVRgAAAAC/pok%C3%A9mon-pokeshipping.gif https://media.tenor.com/YgkED1S-Or0AAAAC/clapping-clapping-hands.gif https://media.tenor.com/Dtjxa7rizZYAAAAd/jahy-sama-anime.gif + +focapensante https://c.tenor.com/eo4LPbwUlMIAAAAd/seal-waiting.gif + +sexo https://tenor.com/view/rickroll-roll-rick-never-gonna-give-you-up-never-gonna-gif-22954713 + +high5 https://media.tenor.com/5K4RPfnQ2RUAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/5EIEPqvzwtAAAAAC/high-five-patrick-star.gif https://media.tenor.com/9HaRonB1B78AAAAC/inazuma-eleven.gif https://tenor.com/view/inazuma-eleven-gif-25044299 https://media1.tenor.com/images/2a524f60132e22dae94f1059708ad663/tenor.gif?itemid=27287972 https://media.tenor.com/O8MTEvhUIsYAAAAC/grookey-pokemon.gif https://media.tenor.com/QL3npLEW16AAAAAC/pokemon.gif + +fbi https://media.tenor.com/5KMl_bmDFWAAAAAC/fbi-swat.gif https://c.tenor.com/lBVRooSGVB4AAAAC/navy-seal-gun.gif + +bang https://media.tenor.com/50egAhARCjEAAAAC/cat-shooting.gif https://media.tenor.com/K6aPMqQsGkUAAAAC/shoot-gift.gif https://media.tenor.com/5LQFz4CpTmsAAAAC/pull-the-trigger-fire.gif https://media.tenor.com/ggBL-mf1-swAAAAC/guns-anime.gif https://media.tenor.com/Vja2MkojIgsAAAAC/anime-gun.gif https://media.tenor.com/6VM7lzsBSuUAAAAC/id-invaded-gun.gif + +gol https://media.tenor.com/KOiPL1qNDosAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/1Hu4-E53uWAAAAAd/iniesta-andres.gif https://media.tenor.com/JB1IZxAhIisAAAAC/kicking-neymar-jr.gif https://media.tenor.com/NUZ5ojFq9aMAAAAM/inazuma-eleven-tenku-otoshi.gif https://media.tenor.com/qAbmTxrO2p0AAAAd/r2v-messi.gif https://media.tenor.com/kSFJhORZMTAAAAAC/cristiano-ronaldo-real-madrid.gif + +decidido https://media.tenor.com/zEercNcqhGcAAAAC/inazuma-eleven-ina11.gif https://media.tenor.com/SvOqyNeF7ZwAAAAC/squirtle-race.gif https://media.tenor.com/2DJB1Ub-zA8AAAAC/dug-nod.gif https://media.tenor.com/1Fz1trKlB3sAAAAC/inazuma-eleven-smile.gif + +guiño https://tenor.com/view/rias-gremory-highschool-dxd-gif-18709318 https://media.tenor.com/gaiKIUG-zNoAAAAC/friends-joey-tribbiani.gif https://media.tenor.com/cwoN93BINOMAAAAC/so-good-wink.gif https://media.tenor.com/F3la7LnCiGAAAAAC/mighty-lancer-games-wink.gif https://media.tenor.com/-5AUG9ixQZgAAAAC/anime-girl.gif https://media.tenor.com/xONZU2D7OvIAAAAC/you-got-this-cute.gif https://media.tenor.com/_q4i8iO-YkIAAAAC/scorbunny-pokemon.gif + +destruir https://tenor.com/view/rias-gremory-powers-gif-12565004 https://media.tenor.com/nD5cv8oodb8AAAAC/reptar-city.gif https://tenor.com/view/house-explosion-explode-boom-kaboom-gif-19506150 https://tenor.com/view/guaton-computadora-enojado-computer-rage-gif-14480338 https://media.tenor.com/kmHJgipLJCYAAAAC/thunderbolt-pikachu.gif https://media.tenor.com/ME4rLvm-2YsAAAAC/freeza-frieza.gif https://media.tenor.com/42kBbICSCAMAAAAC/arale-dr-slump.gif https://media.tenor.com/RSp2ieJayNsAAAAd/panda-destroy.gif https://media.tenor.com/M5xHAKQRpNYAAAAM/bh187-spongebob.gif https://media.tenor.com/IWNBDjTjHAwAAAAd/lugnut-bomb.gif https://media.tenor.com/zla_H0pKeHkAAAAd/hotchlp.gif https://tenor.com/view/pikachu-pikachu-thunderbolt-gif-23704863 + +enfadado https://tenor.com/view/highschooldxd-rias-gremory-gif-15927824 https://media.tenor.com/Gn4GMT8XbmAAAAAM/naranja.gif https://media.tenor.com/Q3406JOSa5wAAAAC/angry-anger.gif https://media.tenor.com/aZ1PR9DpnOYAAAAC/annoyed-disappointed.gif https://media.tenor.com/eOdFZEifmrgAAAAC/anger-rage.gif https://media.tenor.com/hywZNm_1efkAAAAd/csgo-banging-table.gif https://media.tenor.com/L9cvhVRnl_sAAAAC/rage-quit.gif https://media.tenor.com/dVHnyyzoZdAAAAAC/homer-stressed.gif https://media.tenor.com/cYRAeQqpaUMAAAAC/anime-angry-slow-loop.gif https://media.tenor.com/sajJvA6SUhYAAAAC/gabriela-anime.gif https://media.tenor.com/kr6p4dGDFXMAAAAC/emolga-pokemon.gif https://media.tenor.com/0CLVwOcArzIAAAAC/sinirli-pikachu.gif https://media.tenor.com/Gn4GMT8XbmAAAAAM/naranja.gif + +pegar https://tenor.com/view/will-smith-oscars-chris-rock-slap-angry-gif-25233486 https://media.tenor.com/7JVff7vMCVkAAAAC/face-punch-punch.gif https://media.tenor.com/6Cp5tiRwh-YAAAAC/meme-memes.gif https://media.tenor.com/kk05-mUTI-YAAAAC/spanking-foghorn.gif https://media.tenor.com/O0XLzUO24X4AAAAC/sape-golpear.gif https://media.tenor.com/X-xCHJc5IqUAAAAC/boy-punish-mad.gif https://media.tenor.com/jedFg3-9x28AAAAC/slap-smack-butt.gif https://media.tenor.com/Tvi-YMJYtbgAAAAd/bh187-spongebob.gif https://media.tenor.com/yHX61qy92nkAAAAC/yoshi-mario.gif https://media.tenor.com/9ruv1qF29aoAAAAC/charizard-dragon.gif https://media.tenor.com/HPEyGQIHKGUAAAAC/clubber-lang.gif + +stonks https://tenor.com/view/stonks-up-stongs-meme-stocks-gif-15715298 + +dolor https://media.discordapp.net/attachments/667159642199162901/1025800727853011005/Desgarre.gif https://media.tenor.com/-vmlqClGjecAAAAC/painful-chris-traeger.gif https://media.tenor.com/Njt51xxHbYgAAAAC/sore-back-sore.gif https://media.tenor.com/j9BeW6kXNb0AAAAC/dolor-copa-america.gif https://media.tenor.com/c5vNwNeDOXcAAAAd/me-duele-la-rodilla-me-torci.gif https://media.tenor.com/JWxQKmrP4fcAAAAC/disney-up.gif https://media.tenor.com/n72RY0zUBpwAAAAd/dolor-de-espalda-enchufe-tv.gif https://media.tenor.com/iv4iDH1AgqcAAAAd/mal-de-dos1.gif + +bailar https://media.tenor.com/3sRGst4MU7AAAAAC/minecraft-minecraft-online.gif https://media.tenor.com/LUFs-A8Gx0MAAAAd/dance-dancing.gif https://media.tenor.com/-0eBuulMAA8AAAAC/dance.gif https://media.tenor.com/ZgIRCUMksogAAAAC/sing-crayon-shin-chan.gif https://media.tenor.com/dFsURp-wUdgAAAAC/sans-dance.gif https://media.tenor.com/SwP1P8kBP8MAAAAM/vegetta777-vegetta.gif https://media.tenor.com/0Cb4CZlbg5IAAAAC/luzu-karmaland.gif https://media.tenor.com/G-aauG3LEDwAAAAd/inazuma-eleven-inazuma-eleven-jack.gif + +wtf https://media.tenor.com/Jm0zWb4WsnAAAAAd/willyrex-bailando.gif https://media.tenor.com/BZXqwec-P2AAAAAC/what-wtf.gif https://media.tenor.com/EnRojaH2AH4AAAAC/confused-meme.gif https://tenor.com/view/bunny-what-huh-confused-gif-16384988 https://media.tenor.com/HnJpjRirG5UAAAAC/jackie-chan-meme.gif https://media.tenor.com/3uNzbnxnr90AAAAd/what-wtf.gif https://c.tenor.com/XmsP1zzo-G4AAAAd/huh-what-is-it.gif + +musicpls https://open.spotify.com/playlist/1RTQm9p4auVQ2b9qHh8bHe?si=0d0dcc6b81e647c5 https://open.spotify.com/playlist/6t8xps2iUWwrTRFoGDx2YF?si=c598e2ebb1d84b31 https://open.spotify.com/playlist/5KoeRg68FugCy9UHCQtFUv?si=8094dd3cc9f64ae8 https://open.spotify.com/album/4jLw2cj03QQdeflXgnnMva?si=d-Ozuq-vT_emApm6n-rHkA https://open.spotify.com/playlist/51LVO7V3Y7xxn7jrPPbWuU?si=c4820d6308234518 https://open.spotify.com/album/3eKdGQuOgOOUBMNLrMu56z?si=qzdhUUfkR3S7kZUNZIo_MQ https://open.spotify.com/album/4yzargqiTUbJ9HxRjKqh6Y?si=7koRPC65TlSjrp65qeTaLg \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..514635a --- /dev/null +++ b/main.py @@ -0,0 +1,119 @@ +import discord +import os +import random +from flask import Flask +from threading import Thread +import time + + +app = Flask(__name__) + +intents = discord.Intents.all() +intents.members = True + + +bot = discord.Bot(intents=intents) +NL = "\n" +PREFIX = "f!" + +cmds = [] + +@bot.event +async def on_ready(): + print(f"Bot vivo! \nUsuario: {bot.user}") + await bot.user.edit(username="GIFbot") + await bot.change_presence( + status=discord.Status.online, + activity=discord.Activity( + type=discord.ActivityType.playing, + name="f!helpme para obtener la lista de comandos")) + channel = bot.get_channel(1153429735527948399) + msg = await channel.fetch_message(1153429808429158460) + print(f"características actuales: {msg.content}") + await send_log(f"hora de inicio: {time.ctime(time.time())}") + +@bot.event +async def on_message(message): + for cmd in cmds: + if message.content.startswith(f'{PREFIX}{cmd[0]}'): + await message.channel.send(random.choice(cmd[1])) + break + + if message.content.startswith(f'{PREFIX}helpme'): + await message.channel.send(make_help()) + +@bot.command(description="Añade una característica más de Arnau!") +async def add(ctx, attr: discord.Option(str)): + channel = bot.get_channel(1153429735527948399) + msg = await channel.fetch_message(1153429808429158460) + if attr.lower() not in msg.content.lower(): + await msg.edit(content = f'{msg.content}\n- {attr}') + await ctx.respond(f"Característica añadida! ", ephemeral=True) + await send_log(f"Característica añadida: {attr} por {ctx.user}") + + else: + await ctx.respond("Característica ya añadida!", ephemeral=True) + +@bot.command(description = "Borrar una característica de Arnau (sólo admins)") +async def delete(ctx, attr: discord.Option(str)): + channel = bot.get_channel(1153429735527948399) + msg = await channel.fetch_message(1153429808429158460) + role = discord.utils.get(ctx.guild.roles, name = "Admin") + if role not in ctx.author.roles or ctx.author.id == 676816739065004043: + await ctx.respond("No tienes permiso para hacerlo!", ephemeral = True) + return + + if attr.lower() not in msg.content.lower(): + await ctx.respond("Característica no encontrada.", ephemeral = True) + + else: + await msg.edit(content = f'{msg.content.replace(f"{NL}- {attr}", "")}') + await ctx.respond("Característica eliminada :(", ephemeral = True) + await send_log(f"Característica eliminada: {attr} por {ctx.user}") + + +async def send_log(msg): + channel = bot.get_channel(1153800096761262152) + msg = await channel.send(msg) + +@app.route("/") +def startpage(): + return "" + +def parse_cmds(f): + cmd_file = open(f) + for line in cmd_file.readlines(): + if len(line.rstrip()) == 0: + continue + cmd = line.split(" ")[0] + links = [_ for _ in line.split()[1:]] + cmds.append((cmd, links)) + +def make_help(): + help = ("helpme", f"""El prefijo de este bot es: f! + +Los comandos son: +{NL.join(_[0] for _ in cmds)} + +Disfrutad del bot +\~\~Mike & BinLAB\~\~ +""") + return help[1] + +def runServer(): + app.run(host='0.0.0.0', port=8181) + +def keep_alive(): + t = Thread(target=runServer) + t.start() + +def run(): + keep_alive() + parse_cmds("cmds.txt") + make_help() + try: + return bot.run(os.environ['TOKEN']) + except: + return os.system("kill 1") # sinceramente, no sé por qué funciona ni si realmente funciona así, pero funciona + +run() \ No newline at end of file