Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions cogs/randcommands.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import asyncio
import discord
import random
import re

from asyncio import to_thread
from io import BytesIO
from random import choice, getrandbits, randint
from time import perf_counter
import re

import discord
from discord.ext import commands

from fractal import fractal
Expand All @@ -21,12 +22,13 @@ def __init__(self, bot):

async def cog_load(self):
bases = {
"b": 2,
"o": 8,
"d": 10,
"h": 16,
"64": 64,
}
"b": 2,
"o": 8,
"d": 10,
"h": 16,
"64": 64,
}

async def convert_func(ctx, number: str):
from_base = ctx.command.extras["from_base"]
to_base = ctx.command.extras["to_base"]
Expand Down Expand Up @@ -380,5 +382,12 @@ async def oreify(self, ctx, *, text: str):
result = re.sub(pattern, lambda m: m.group() if m.group().lower() == 'ore' else 'ORE', text, flags=re.IGNORECASE)
await reply(ctx, result)

@commands.command(help="A p p l y t h e p i p p o c u r s e t o s o m e t e x t.")
async def pippocurse(self, ctx, *, text: str):
result = text.replace(". ", "." + " " * random.randint(0, 4))
if random.randint(0, 5) == 0:
result = " ".join(list(result))
await reply(ctx, result)

async def setup(bot):
await bot.add_cog(RandCommands(bot))