def uwu(update: 'telegram.Update', context: 'telegram.ext.CallbackContext') -> None: """Uwuify text""" if update.message: message: 'telegram.Message' = update.message else: return text: str flags: uwuify.UwuifyFlag = uwuify.SMILEY if not context.args: try: args: str = message.reply_to_message.text or message.reply_to_message.caption # type: ignore text = uwuify.uwu(args, flags=flags) except AttributeError: text = "*Usage:* `/uwu {TEXT}`\n" \ "*Example:* `/uwu hello, how are you?`\n" \ "Reply with `/uwu` to a message to uwuify it." else: text = uwuify.uwu(' '.join(context.args), flags=flags) if message.reply_to_message: message.reply_to_message.reply_text(text=text) else: message.reply_text(text=text)
async def uwuify(self, ctx): global cmd_in_process cmd_in_process = True message = ctx.message.content messageSend = message[8:] await ctx.send(uwuify.uwu(messageSend)) cmd_in_process = False
async def pasta(ctx, at, *args): (id, good) = getIdFromAt(at) if not good: ctx.send("First param must be @someone") (num, mod) = parseArgs(args) CP = loadPasta('./pastas/' + str(id) + '.txt') e = mod in EMOJIFY s = mod in SARCASTIFY u = mod in UWUIFY i = randint(0, len(CP) - 1) if num is not None: i = num cp = CP[i % len(CP)] await ctx.send('<@!{}>'.format(VG)) for line in cp: if s: line = sarcastify(line) elif e: line = emojify(line) elif u: line = uwu(line) await ctx.send(line)
async def uwuify(self, ctx, *, text: str): """Uwuify a text""" if len(text) > 200: return flags = uwuify.SMILEY | uwuify.YU # lazyness 200 await ctx.send(uwuify.uwu(text, flags=flags))
async def uwuify(self, ctx: NewCtx, *, text: str): """Uwuify a text""" if len(text) > 200: raise commands.BadArgument(message='The text needs to be shorter then 200 characters') flags = uwuify.SMILEY | uwuify.YU # lazyness 200 allowed_mentions = discord.AllowedMentions(everyone=False, users=False, roles=False) await ctx.send(uwuify.uwu(text, flags=flags), allowed_mentions=allowed_mentions)
def main(smiley, yu, text): text = " ".join(text) flags = 0 if smiley: flags |= SMILEY if yu: flags |= YU uwuified = uwu(text, flags=flags) click.echo(uwuified)
async def translator(message, argDict): #monkey translate .... #12345678901234567 toTranslate = message.content[17:] logging.info("attempting to translate text") text = uwuify.uwu(toTranslate) if text == "": await message.channel.send("can't translate ape") else: await message.channel.send(f"{text}")
async def shitpasta(ctx, *args): (num, mod) = parseArgs(args) CP = loadPasta(bodenshit) e = mod in EMOJIFY s = mod in SARCASTIFY u = mod in UWUIFY i = randint(0, 10000) if num is not None: i = num cp = CP[i % len(CP)] await ctx.send('<@!{}>'.format(JB)) for line in cp: if s: line = sarcastify(line) elif e: line = emojify(line) elif u: line = uwu(line) await ctx.send(line)
async def uwuify(self, ctx: commands.Context, **flags): """ Uwuify text flags: --smiley: 50% chance of smileys on line endings --yu: u -> yu (doesn't apply to first char of words) params: message: the message to uwuify """ message = " ".join(flags["message"]) uwu_flags = 0 if flags["smiley"]: uwu_flags |= uwuify.SMILEY if flags["yu"]: uwu_flags |= uwuify.YU await ctx.send(uwuify.uwu(message, flags=uwu_flags))
async def uwuify(self, ctx: commands.Context, *, message: str): """UwUifies text""" await ctx.send(uwuify.uwu(message, flags=uwuify.SMILEY))
async def uwuify(self, ctx, *, args): flags = uwuify.SMILEY | uwuify.YU await ctx.send(uwuify.uwu(args, flags=flags))
async def uwuify(ctx, *, args): await ctx.send(uwu(args))
async def _uwu(ctx: SlashContext, message: str): await ctx.send(uwuify.uwu(message, flags=uwuify.SMILEY | uwuify.YU))
def uwu_str(message: str) -> str: message = message.replace("!uwu ", "").replace("!uwud ", "") message = message.replace("!uwu", "").replace("!uwud", "") message = discord.utils.escape_mentions(message) return uwuify.uwu(message, flags=flags)
async def uwuify(self, ctx, *, message): await ctx.send(uwuify.uwu(message))
async def owoify(self, ctx, *, message): """uwuify some text""" kwargs = {} if len(message) < 1500: kwargs["flags"] = uwuify.SMILEY await ctx.send("**{}**: ".format(ctx.author) + uwuify.uwu(message, **kwargs))
async def owoify(self, ctx, *, message): """ Do you hate yourself with a passion? This is the command for you! """ flags = uwuify.SMILEY await ctx.safe_send(uwuify.uwu(message, flags=flags))