Skip to content
Merged
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
7 changes: 7 additions & 0 deletions cogs/randcommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from io import BytesIO
from random import choice, getrandbits, randint
from time import perf_counter
import re

import discord
from discord.ext import commands
Expand Down Expand Up @@ -373,5 +374,11 @@ async def mock(self, ctx, *, text: str):
)
await reply(ctx, mocked)

@commands.command(help="OREify sOREm Text.")
async def oreify(self, ctx, *, text: str):
pattern = r'ore|er(?![a-zA-Z])|or|our|ure|ar|ur|(?<!o)o(?!o)'
result = re.sub(pattern, lambda m: m.group() if m.group().lower() == 'ore' else 'ORE', text, flags=re.IGNORECASE)
await reply(ctx, result)

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