Tests zalgo
continuous-integration/drone/push Build is passing

Soort van. Kijkt iig of de conversie misschien goed gaat.
This commit is contained in:
2022-12-07 22:36:39 +01:00
parent 8395a0b4a6
commit 055f170f62
2 changed files with 18 additions and 8 deletions
+12 -8
View File
@@ -108,6 +108,16 @@ class Shitpost(commands.Cog):
yield from ctx.channel.send(ctx.author.mention + ' ' + str(Message))
def zalgofy(self, sentence, factor = 4):
random.seed(datetime.now().timestamp())
message = ''
#from https://github.com/Aethylia/zalgo-cli:
for letter in sentence:
for i in range(factor):
letter += random.randint(0x300, 0x36f).to_bytes(2, byteorder='big').decode('utf-16be')
message += letter
return message
@commands.command(pass_context=True, hidden=False)
@asyncio.coroutine
def zalgo(self, ctx, *, arg):
@@ -118,18 +128,12 @@ class Shitpost(commands.Cog):
Gebruik: !zalgo [text]
Bijv: !zalgo "Je moeder"
"""
factor = 4
message = ''
#from https://github.com/Aethylia/zalgo-cli:
for letter in arg:
for i in range(factor):
letter += random.randint(0x300, 0x36f).to_bytes(2, byteorder='big').decode('utf-16be')
message += letter
message = self.zalgofy(arg)
try:
yield from ctx.message.delete()
except:
print("No permission to delete message")
yield from ctx.channel.send(ctx.author.mention + ' ' + str(message))
yield from ctx.channel.send(str(message))
def get_corona_message(self):
response = requests.get('https://covid.ourworldindata.org/data/latest/owid-covid-latest.json')