Soort van. Kijkt iig of de conversie misschien goed gaat.
This commit is contained in:
+12
-8
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user