Reformatted with black (sorry forgot)

This commit is contained in:
TheScriptPony 2021-01-06 00:15:11 -05:00
parent bac2be22e4
commit 7caa3222ed

View file

@ -34,7 +34,6 @@ class Memeify(commands.Cog):
else:
return ctx.message.clean_content, True
# ------------ bify ------------
@commands.command()
async def bify(self, ctx, *, content: str = None):
@ -78,7 +77,6 @@ class Memeify(commands.Cog):
bif = "b" + bif[1:]
return bif.replace("b", "🅱️")
# ------------ frenchify ------------
@commands.command()
async def frenchify(self, ctx, *, content: str = None):
@ -109,57 +107,57 @@ class Memeify(commands.Cog):
return "".join(final)
def __french(self, text):
text = text.replace('age','aje')
text = text.replace('ale','aile')
text = text.replace('ant','ent')
text = text.replace('ared','aired')
text = text.replace('ay','ai')
text = text.replace('blem','blaim')
text = text.replace('ble','buhl')
text = text.replace('bout','but')
text = text.replace('ck','k')
text = text.replace('eal','eahl')
text = text.replace('ear','air')
text = text.replace('ess','ez')
text = text.replace('ew','u')
text = text.replace('gen','jen')
text = text.replace('gon','jen')
text = text.replace('ies','ees')
text = text.replace('ill','eehl')
text = text.replace('ing','eng')
text = text.replace('ired','iaired')
text = text.replace('ire','iyaire')
text = text.replace('ise','ize')
text = text.replace('ising','izeeng')
text = text.replace('ist','eest')
text = text.replace('ith','iv')
text = text.replace("it's",'eet eez')
text = text.replace("i've",'I have')
text = text.replace('lar','lair')
text = text.replace('logic','lojic')
text = text.replace('loth','luth')
text = text.replace('ment','mont')
text = text.replace('ol','ul')
text = text.replace('ool','oo-el')
text = text.replace('oom','uhm')
text = text.replace('orl','hirl')
text = text.replace('or','air')
text = text.replace('our','ur')
text = text.replace('oute','oote')
text = text.replace('out','oot')
text = text.replace('shion','she-on')
text = text.replace('sion','she-on')
text = text.replace('some','zum')
text = text.replace('stion','stshe-on')
text = text.replace('suit','zoot')
text = text.replace('them','zem')
text = text.replace('thing','theeng')
text = text.replace('tion','she-on')
text = text.replace('tle','-tell')
text = text.replace('ture','tuair')
text = text.replace('ty','tay')
text = text.replace('ver','vair')
text = text.replace("you've",'you have')
text = text.replace("age", "aje")
text = text.replace("ale", "aile")
text = text.replace("ant", "ent")
text = text.replace("ared", "aired")
text = text.replace("ay", "ai")
text = text.replace("blem", "blaim")
text = text.replace("ble", "buhl")
text = text.replace("bout", "but")
text = text.replace("ck", "k")
text = text.replace("eal", "eahl")
text = text.replace("ear", "air")
text = text.replace("ess", "ez")
text = text.replace("ew", "u")
text = text.replace("gen", "jen")
text = text.replace("gon", "jen")
text = text.replace("ies", "ees")
text = text.replace("ill", "eehl")
text = text.replace("ing", "eng")
text = text.replace("ired", "iaired")
text = text.replace("ire", "iyaire")
text = text.replace("ise", "ize")
text = text.replace("ising", "izeeng")
text = text.replace("ist", "eest")
text = text.replace("ith", "iv")
text = text.replace("it's", "eet eez")
text = text.replace("i've", "I have")
text = text.replace("lar", "lair")
text = text.replace("logic", "lojic")
text = text.replace("loth", "luth")
text = text.replace("ment", "mont")
text = text.replace("ol", "ul")
text = text.replace("ool", "oo-el")
text = text.replace("oom", "uhm")
text = text.replace("orl", "hirl")
text = text.replace("or", "air")
text = text.replace("our", "ur")
text = text.replace("oute", "oote")
text = text.replace("out", "oot")
text = text.replace("shion", "she-on")
text = text.replace("sion", "she-on")
text = text.replace("some", "zum")
text = text.replace("stion", "stshe-on")
text = text.replace("suit", "zoot")
text = text.replace("them", "zem")
text = text.replace("thing", "theeng")
text = text.replace("tion", "she-on")
text = text.replace("tle", "-tell")
text = text.replace("ture", "tuair")
text = text.replace("ty", "tay")
text = text.replace("ver", "vair")
text = text.replace("you've", "you have")
text_arr = text.split(" ")
@ -183,7 +181,11 @@ class Memeify(commands.Cog):
if self.__compare_format(word) == "mister" or self.__compare_format(word) == "sir":
text_arr[key] = "Monsieur"
if self.__compare_format(word) == "miss" or self.__compare_format(word) == "missus" or self.__compare_format(word) == "madame":
if (
self.__compare_format(word) == "miss"
or self.__compare_format(word) == "missus"
or self.__compare_format(word) == "madame"
):
text_arr[key] = "Madamoiselle"
if self.__compare_format(word) == "it":
@ -255,28 +257,28 @@ class Memeify(commands.Cog):
return text
def __compare_format(self, word):
word = word.translate(str.maketrans('', '', string.punctuation))
word = word.translate(str.maketrans("", "", string.punctuation))
word = word.lower()
return word
def __make_funny_es(self, text):
bits = text.split('e')
bits = text.split("e")
text = ""
for bit in bits:
option = random.randrange(1,5)
option = random.randrange(1, 5)
if option == 4:
text += (bit + "eacute")
text += bit + "eacute"
else:
text += (bit + "e")
text += bit + "e"
text = text.replace('eeacute','ee')
text = text.replace('eacutee','ee')
text = text.replace('eacuteeacute','ee')
text = text.replace("eeacute", "ee")
text = text.replace("eacutee", "ee")
text = text.replace("eacuteeacute", "ee")
if text.endswith('eacute'):
if text.endswith("eacute"):
text = text[:-6]
elif text.endswith('e'):
elif text.endswith("e"):
text = text[:-1]
return text