This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Coded By Tatuck :D | |
| from urllib import request | |
| import threading | |
| import sys | |
| import urllib | |
| import random | |
| threadsQuantity = 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Coded by Tatuck :D | |
| # USAGE: python keys2value.py yourJSON.json yourJSONOUT.json | |
| import json | |
| import sys | |
| jsonFile = open(sys.argv[1],"r") | |
| jsonLoad = json.loads(jsonFile.read()) | |
| jsonInverted = {value:key for key, value in jsonLoad.items()} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Con este código puedes usar el comando !escribir "buenos días" para que el bot escriba "buenos días" en el canal donde haya sido usado | |
| # Librerías | |
| import discord | |
| from discord.ext import commands | |
| client = commands.Bot(command_prefix="!") # Define el cliente de Discord, llamándole cuando se encuentre un mensaje en el que alguien ha escrito "!" delante de él. Como un comando, ejemplo !help | |
| @client.command() # Le dice a la librería de Discord que trate la siguiente línea (una función) como un comando por ejemplo, le manda el contexto. | |
| async def escribir(ctx, texto="VALOR PREDETERMINADO"): # Crea la función (un comando) con una entrada de usuario, en este caso un texto, si no se escibe nada en ese campo, escribe "VALOR PREDETERMINADO" | |
| await ctx.send(texto) # CTX = Contexto de cuándo ha sido usado el comando |