async def ppsize(self, ctx, user_mention=None): async with ctx.channel.typing(): if (user_mention is None): member = ctx.author elif (is_mention.match(user_mention)): converter = MemberConverter() member = await converter.convert(ctx, user_mention) else: member = None text = "Command usage: `fbot ppsize` or `fbot ppsize <@mention>`" if (member is not None): ppsize = None if member.bot: text = "Bots don't have pps, you do know that?" else: try: ppsize = db.getppsize(member.id) if ppsize < 0: ppsize = random.randint(0, 16) db.updateppsize(member.id, ppsize) except: db.register(member.id) ppsize = random.randint(0, 16) db.updateppsize(member.id, ppsize) if (ppsize is not None): pp = "8" + "=" * ppsize + "D" text = f"{member.mention}'s ppsize: `{pp}`" await ctx.send(text, allowed_mentions=AllowedMentions.all())
async def on_pipi(self, msg): if msg.author.bot: return msgcont = self.bot.static.remove_strange_chars(msg.content.lower()) if "pipi" in msgcont: await msg.author.send(utils.escape_markdown( f"Are you kidding ??? What the **** are you talking about {msg.author.mention} ? You are a biggest " f"looser i ever seen in my life ! You was doing PIPI in your pampers when i was beating players " f"much more stronger then you! You are not proffesional, because proffesionals knew how to lose and " f"congratulate opponents, you are like a girl crying after i beat you! Be brave, be honest to " f"yourself and stop this trush talkings!!! Everybody know that i am very good blitz player, i can " f'win anyone in the world in single game! And "w"esley "s"o is nobody for me, just a player who ' f"are crying every single time when loosing, ( remember what you say about Firouzja ) !!! Stop " f"playing with my name, i deserve to have a good name during whole my chess carrier, I am " f"Officially inviting you to OTB blitz match with the Prize fund! Both of us will invest 5000$ and " f"winner takes it all! I suggest all other people who's intrested in this situation, just take a " f"look at my results in 2016 and 2017 Blitz World championships, and that should be enough... No " f"need to listen for every crying babe, Tigran Petratsyan is always play Fair ! And if someone will " f"continue Officially talk about me like that, we will meet in Court! God bless with true! True " f"will never die ! Liers will kicked off..."), allowed_mentions=AllowedMentions.all())
from contextlib import suppress import re from discord import AllowedMentions, Message, NotFound from discord.ext import commands from fuzzywuzzy import fuzz from utils import RatBot, RatCog, strip_str tenor_pattern = re.compile(r"https{0,1}:\/\/(www.)*tenor.com\/view\/([a-z]|-)+\d+") allowed_mentions = AllowedMentions.all() class Censorship(RatCog): """Allows me to delete things I don't like""" async def on_twitter(self, message: Message) -> None: if ( not message.guild or message.author.id not in {368780147563823114, 700133917264445480} or self.config.primary_guild != message.guild.id ): return content = strip_str(message.content) if fuzz.partial_ratio(content, "twitter") > 85: with suppress(NotFound): await message.delete() await message.author.send("Trolled") @commands.Cog.listener()