From 8c9784ff7ca81a89e9d90b7aecaad4a435a143b0 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:15:38 +0930 Subject: [PATCH 01/37] Add the channel --- uwu/uwu.py | 153 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 113 insertions(+), 40 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index d7646445..c28c0350 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + UwU channel webhook feature.""" # ruff: noqa: S311 import random @@ -6,7 +6,7 @@ from typing import ClassVar import discord -from redbot.core import commands +from redbot.core import commands, Config from .pcx_lib import type_message @@ -14,8 +14,8 @@ class UwU(commands.Cog): """UwU.""" - __author__ = "PhasecoreX" - __version__ = "2.1.1" + __author__ = "PhasecoreX + Modified by Didi" + __version__ = "2.2.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -49,6 +49,12 @@ class UwU(commands.Cog): "-.-", ] + def __init__(self, bot): + self.bot = bot + self.config = Config.get_conf(self, identifier=1234567890) + # store a list of channel IDs for automatic UwU + self.config.register_guild(auto_channels=[]) + # # Red methods # @@ -62,6 +68,48 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N """Nothing to delete.""" return + # + # Setup commands + # + + @commands.guild_only() + @commands.admin_or_permissions(manage_guild=True) + @commands.group() + async def uwuset(self, ctx: commands.Context): + """Setup UwU features.""" + if ctx.invoked_subcommand is None: + await ctx.send_help() + + @uwuset.command(name="addchannel") + async def uwuset_addchannel(self, ctx: commands.Context, channel: discord.TextChannel): + """Add a channel for automatic UwU messages.""" + async with self.config.guild(ctx.guild).auto_channels() as channels: + if channel.id not in channels: + channels.append(channel.id) + await ctx.send(f"Added {channel.mention} to UwU auto channels.") + + @uwuset.command(name="removechannel") + async def uwuset_removechannel(self, ctx: commands.Context, channel: discord.TextChannel): + """Remove a channel from automatic UwU messages.""" + async with self.config.guild(ctx.guild).auto_channels() as channels: + if channel.id in channels: + channels.remove(channel.id) + await ctx.send(f"Removed {channel.mention} from UwU auto channels.") + + @uwuset.command(name="listchannels") + async def uwuset_listchannels(self, ctx: commands.Context): + """List all channels set for automatic UwU messages.""" + channels = await self.config.guild(ctx.guild).auto_channels() + if not channels: + await ctx.send("No channels are set for automatic UwU messages.") + return + mentions = [] + for cid in channels: + ch = ctx.guild.get_channel(cid) + if ch: + mentions.append(ch.mention) + await ctx.send("Automatic UwU channels: " + ", ".join(mentions)) + # # Command methods # @@ -71,15 +119,12 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: """Uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: - with suppress( - discord.Forbidden, discord.NotFound, discord.HTTPException - ): + with suppress(discord.Forbidden, discord.NotFound, discord.HTTPException): message_id = ctx.message.reference.message_id if message_id: text = (await ctx.fetch_message(message_id)).content if not text: messages = [message async for message in ctx.channel.history(limit=2)] - # [0] is the command, [1] is the message before the command text = messages[1].content or "I can't translate that!" await type_message( ctx.channel, @@ -90,7 +135,46 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Public methods + # Listener + # + + @commands.Cog.listener() + async def on_message(self, message: discord.Message): + # Ignore bot messages + if message.author.bot or not message.guild: + return + + auto_channels = await self.config.guild(message.guild).auto_channels() + if message.channel.id not in auto_channels: + return + + # UwUize content + uwu_text = self.uwuize_string(message.content) + + # Delete original message + with suppress(discord.Forbidden, discord.NotFound): + await message.delete() + + # Find or create webhook + webhook = None + for wh in await message.channel.webhooks(): + if wh.name == "UwU Webhook": + webhook = wh + break + + if webhook is None: + webhook = await message.channel.create_webhook(name="UwU Webhook") + + # Send UwUized message as the user + await webhook.send( + uwu_text, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + ) + + # + # UwUize methods # def uwuize_string(self, string: str) -> str: @@ -110,14 +194,10 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """Uwuize and return a word. - - Thank you to the following for inspiration: - https://github.com/senguyen1011/UwUinator - """ + """Uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") - punctuations = word[len(uwu) :] + punctuations = word[len(uwu):] final_punctuation = punctuations[-1] if punctuations else "" extra_punctuation = punctuations[:-1] if punctuations else "" @@ -134,25 +214,23 @@ def uwuize_word(self, word: str) -> str: final_punctuation = random.choice(self.KAOMOJI_SPARKLES) # Full word exceptions - if uwu in ("you're", "youre"): - uwu = "ur" - elif uwu == "fuck": - uwu = "fwickk" - elif uwu == "shit": - uwu = "poopoo" - elif uwu == "bitch": - uwu = "meanie" - elif uwu == "asshole": - uwu = "b-butthole" - elif uwu in ("dick", "penis"): - uwu = "peenie" - elif uwu in ("cum", "semen"): - uwu = "cummies" - elif uwu == "ass": - uwu = "b-butt" - elif uwu in ("dad", "father"): - uwu = "daddy" - # Normal word conversion + exceptions = { + "you're": "ur", + "youre": "ur", + "fuck": "fwickk", + "shit": "poopoo", + "bitch": "meanie", + "asshole": "b-butthole", + "dick": "peenie", + "penis": "peenie", + "cum": "cummies", + "semen": "cummies", + "ass": "b-butt", + "dad": "daddy", + "father": "daddy", + } + if uwu in exceptions: + uwu = exceptions[uwu] else: # Protect specific word endings from changes protected = "" @@ -176,12 +254,7 @@ def uwuize_word(self, word: str) -> str: ) # Add occasional stutter - if ( - len(uwu) > 2 # noqa: PLR2004 - and uwu[0].isalpha() - and "-" not in uwu - and not random.randint(0, 6) - ): + if len(uwu) > 2 and uwu[0].isalpha() and "-" not in uwu and not random.randint(0, 6): uwu = f"{uwu[0]}-{uwu}" # Add back punctuations and return From 687618552e08bbc589e126b76f7cc28533dc4544 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:18:15 +0930 Subject: [PATCH 02/37] a --- uwu/uwu.py | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index c28c0350..3b9d4bfc 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,6 +1,5 @@ """UwU cog for Red-DiscordBot by PhasecoreX + UwU channel webhook feature.""" -# ruff: noqa: S311 import random from contextlib import suppress from typing import ClassVar @@ -15,7 +14,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Modified by Didi" - __version__ = "2.2.0" + __version__ = "2.2.1" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -60,12 +59,10 @@ def __init__(self, bot): # def format_help_for_context(self, ctx: commands.Context) -> str: - """Show version in help.""" pre_processed = super().format_help_for_context(ctx) return f"{pre_processed}\n\nCog Version: {self.__version__}" async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> None: - """Nothing to delete.""" return # @@ -74,11 +71,10 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.guild_only() @commands.admin_or_permissions(manage_guild=True) - @commands.group() + @commands.group(invoke_without_command=True) async def uwuset(self, ctx: commands.Context): """Setup UwU features.""" - if ctx.invoked_subcommand is None: - await ctx.send_help() + await ctx.send_help() # show help if no subcommand @uwuset.command(name="addchannel") async def uwuset_addchannel(self, ctx: commands.Context, channel: discord.TextChannel): @@ -140,7 +136,9 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @commands.Cog.listener() async def on_message(self, message: discord.Message): - # Ignore bot messages + # Allow commands to still work + await self.bot.process_commands(message) + if message.author.bot or not message.guild: return @@ -148,7 +146,9 @@ async def on_message(self, message: discord.Message): if message.channel.id not in auto_channels: return - # UwUize content + if not message.content: # skip empty messages + return + uwu_text = self.uwuize_string(message.content) # Delete original message @@ -178,7 +178,6 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """Uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -194,7 +193,6 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """Uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") punctuations = word[len(uwu):] @@ -213,7 +211,6 @@ def uwuize_word(self, word: str) -> str: if final_punctuation and not random.randint(0, 4): final_punctuation = random.choice(self.KAOMOJI_SPARKLES) - # Full word exceptions exceptions = { "you're": "ur", "youre": "ur", @@ -232,7 +229,6 @@ def uwuize_word(self, word: str) -> str: if uwu in exceptions: uwu = exceptions[uwu] else: - # Protect specific word endings from changes protected = "" if uwu.endswith(("le", "ll", "er", "re")): protected = uwu[-2:] @@ -240,7 +236,6 @@ def uwuize_word(self, word: str) -> str: elif uwu.endswith(("les", "lls", "ers", "res")): protected = uwu[-3:] uwu = uwu[:-3] - # l -> w, r -> w, n -> ny, ove -> uv uwu = ( uwu.replace("l", "w") .replace("r", "w") @@ -253,9 +248,7 @@ def uwuize_word(self, word: str) -> str: + protected ) - # Add occasional stutter if len(uwu) > 2 and uwu[0].isalpha() and "-" not in uwu and not random.randint(0, 6): uwu = f"{uwu[0]}-{uwu}" - # Add back punctuations and return return uwu + extra_punctuation + final_punctuation From ddff91f9d051f23c6c40039736c3218d1ead7775 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:21:30 +0930 Subject: [PATCH 03/37] a --- uwu/uwu.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 3b9d4bfc..037d6300 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -14,7 +14,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Modified by Didi" - __version__ = "2.2.1" + __version__ = "2.2.2" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -51,7 +51,6 @@ class UwU(commands.Cog): def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=1234567890) - # store a list of channel IDs for automatic UwU self.config.register_guild(auto_channels=[]) # @@ -136,8 +135,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @commands.Cog.listener() async def on_message(self, message: discord.Message): - # Allow commands to still work - await self.bot.process_commands(message) + await self.bot.process_commands(message) # allow commands to run if message.author.bot or not message.guild: return @@ -199,7 +197,6 @@ def uwuize_word(self, word: str) -> str: final_punctuation = punctuations[-1] if punctuations else "" extra_punctuation = punctuations[:-1] if punctuations else "" - # Process punctuation if final_punctuation == "." and not random.randint(0, 3): final_punctuation = random.choice(self.KAOMOJI_JOY) if final_punctuation == "?" and not random.randint(0, 2): From 30e5d38efc2906261b28a76d39b4a8d290e022e5 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:22:13 +0930 Subject: [PATCH 04/37] a --- uwu/__init__.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/uwu/__init__.py b/uwu/__init__.py index 78dbf1c6..a25131af 100644 --- a/uwu/__init__.py +++ b/uwu/__init__.py @@ -1,17 +1,4 @@ -"""Package for UwU cog.""" - -import json -from pathlib import Path - -from redbot.core.bot import Red - from .uwu import UwU -with Path(__file__).parent.joinpath("info.json").open() as fp: - __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] - - -async def setup(bot: Red) -> None: - """Load UwU cog.""" - cog = UwU() - await bot.add_cog(cog) +def setup(bot): + bot.add_cog(UwU(bot)) From 91dff4c8f37df09a7d4a387fd6aad33179e68a6c Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:22:39 +0930 Subject: [PATCH 05/37] revert --- uwu/__init__.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/uwu/__init__.py b/uwu/__init__.py index a25131af..78dbf1c6 100644 --- a/uwu/__init__.py +++ b/uwu/__init__.py @@ -1,4 +1,17 @@ +"""Package for UwU cog.""" + +import json +from pathlib import Path + +from redbot.core.bot import Red + from .uwu import UwU -def setup(bot): - bot.add_cog(UwU(bot)) +with Path(__file__).parent.joinpath("info.json").open() as fp: + __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] + + +async def setup(bot: Red) -> None: + """Load UwU cog.""" + cog = UwU() + await bot.add_cog(cog) From 218ab28ec7a1a096522283d468882f4f4a2d3565 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:23:16 +0930 Subject: [PATCH 06/37] a --- uwu/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/uwu/__init__.py b/uwu/__init__.py index 78dbf1c6..68527875 100644 --- a/uwu/__init__.py +++ b/uwu/__init__.py @@ -2,16 +2,12 @@ import json from pathlib import Path - from redbot.core.bot import Red - from .uwu import UwU with Path(__file__).parent.joinpath("info.json").open() as fp: __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] - async def setup(bot: Red) -> None: """Load UwU cog.""" - cog = UwU() - await bot.add_cog(cog) + await bot.add_cog(UwU(bot)) # ✅ pass bot here From c5c0b287a10e72f17fba301f2324afc5abe3067e Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:30:43 +0930 Subject: [PATCH 07/37] f --- uwu/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/uwu/__init__.py b/uwu/__init__.py index 68527875..5602d0ed 100644 --- a/uwu/__init__.py +++ b/uwu/__init__.py @@ -8,6 +8,7 @@ with Path(__file__).parent.joinpath("info.json").open() as fp: __red_end_user_data_statement__ = json.load(fp)["end_user_data_statement"] -async def setup(bot: Red) -> None: - """Load UwU cog.""" - await bot.add_cog(UwU(bot)) # ✅ pass bot here + +async def setup(bot): + await bot.add_cog(UwU(bot)) + From ffe66791cb709c6d4d2215b83996745e1e6f8ec1 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:34:43 +0930 Subject: [PATCH 08/37] u --- uwu/uwu.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 037d6300..9ec1fae8 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -7,14 +7,14 @@ import discord from redbot.core import commands, Config -from .pcx_lib import type_message +from .pcx_lib import type_message # keep your type_message utility class UwU(commands.Cog): """UwU.""" - __author__ = "PhasecoreX + Modified by Didi" - __version__ = "2.2.2" + __author__ = "PhasecoreX + Didi" + __version__ = "2.3.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -135,16 +135,17 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @commands.Cog.listener() async def on_message(self, message: discord.Message): - await self.bot.process_commands(message) # allow commands to run - + # Ignore bots, DMs, and command messages if message.author.bot or not message.guild: return + if message.content.startswith(tuple(self.bot.command_prefix)): + return auto_channels = await self.config.guild(message.guild).auto_channels() if message.channel.id not in auto_channels: return - if not message.content: # skip empty messages + if not message.content: return uwu_text = self.uwuize_string(message.content) @@ -163,7 +164,7 @@ async def on_message(self, message: discord.Message): if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Send UwUized message as the user + # Send UwUized message as the original user await webhook.send( uwu_text, username=message.author.display_name, From 9bfa2365352a6d08663ebc169dbd68272f11c784 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:42:55 +0930 Subject: [PATCH 09/37] c --- uwu/uwu.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 9ec1fae8..af8c042a 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -14,7 +14,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.0" + __version__ = "2.3.1" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -135,9 +135,11 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @commands.Cog.listener() async def on_message(self, message: discord.Message): - # Ignore bots, DMs, and command messages + # Ignore bots and DMs if message.author.bot or not message.guild: return + + # Ignore commands if message.content.startswith(tuple(self.bot.command_prefix)): return @@ -145,10 +147,8 @@ async def on_message(self, message: discord.Message): if message.channel.id not in auto_channels: return - if not message.content: - return - - uwu_text = self.uwuize_string(message.content) + # Uwuize text if it exists + uwu_text = self.uwuize_string(message.content) if message.content else "" # Delete original message with suppress(discord.Forbidden, discord.NotFound): @@ -160,16 +160,17 @@ async def on_message(self, message: discord.Message): if wh.name == "UwU Webhook": webhook = wh break - if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Send UwUized message as the original user + # Send UwUized message via webhook, include attachments and embeds await webhook.send( - uwu_text, + content=uwu_text, username=message.author.display_name, avatar_url=message.author.display_avatar.url, allowed_mentions=discord.AllowedMentions.none(), + files=[await attachment.to_file() for attachment in message.attachments] if message.attachments else None, + embeds=message.embeds if message.embeds else None, ) # From c38b27d41f380090d0c499114dd4e61993afce8d Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:45:12 +0930 Subject: [PATCH 10/37] k --- uwu/uwu.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index af8c042a..bd153012 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -14,7 +14,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.1" + __version__ = "2.3.2" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -44,7 +44,7 @@ class UwU(commands.Cog): " \\*:・゚✧\\*:・゚✧ ", " ☆\\*:・゚ ", "〜☆ ", - " uguu.., ", + " uguu.. ", "-.-", ] @@ -130,19 +130,15 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener + # Listener for auto-UwU webhook replacement # - @commands.Cog.listener() - async def on_message(self, message: discord.Message): + @commands.Cog.listener("on_message_without_command") + async def uwu_auto_webhook(self, message: discord.Message): # Ignore bots and DMs if message.author.bot or not message.guild: return - # Ignore commands - if message.content.startswith(tuple(self.bot.command_prefix)): - return - auto_channels = await self.config.guild(message.guild).auto_channels() if message.channel.id not in auto_channels: return From 66dfff3dc0a7c6401c0e0363845da41b10456634 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:47:47 +0930 Subject: [PATCH 11/37] t --- uwu/uwu.py | 56 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index bd153012..6defb0dd 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -6,7 +6,6 @@ import discord from redbot.core import commands, Config - from .pcx_lib import type_message # keep your type_message utility @@ -14,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.2" + __version__ = "2.3.3" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -73,7 +72,7 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group(invoke_without_command=True) async def uwuset(self, ctx: commands.Context): """Setup UwU features.""" - await ctx.send_help() # show help if no subcommand + await ctx.send_help() @uwuset.command(name="addchannel") async def uwuset_addchannel(self, ctx: commands.Context, channel: discord.TextChannel): @@ -124,50 +123,51 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: await type_message( ctx.channel, self.uwuize_string(text), - allowed_mentions=discord.AllowedMentions( - everyone=False, users=False, roles=False - ), + allowed_mentions=discord.AllowedMentions(everyone=False, users=False, roles=False), ) # # Listener for auto-UwU webhook replacement # - @commands.Cog.listener("on_message_without_command") - async def uwu_auto_webhook(self, message: discord.Message): - # Ignore bots and DMs + @commands.Cog.listener() + async def on_message(self, message: discord.Message): if message.author.bot or not message.guild: return + # Skip commands + if message.content.startswith(tuple(self.bot.command_prefix)): + return auto_channels = await self.config.guild(message.guild).auto_channels() if message.channel.id not in auto_channels: return + if not message.content: + return - # Uwuize text if it exists - uwu_text = self.uwuize_string(message.content) if message.content else "" + uwu_text = self.uwuize_string(message.content) # Delete original message with suppress(discord.Forbidden, discord.NotFound): await message.delete() # Find or create webhook - webhook = None - for wh in await message.channel.webhooks(): - if wh.name == "UwU Webhook": - webhook = wh - break - if webhook is None: - webhook = await message.channel.create_webhook(name="UwU Webhook") - - # Send UwUized message via webhook, include attachments and embeds - await webhook.send( - content=uwu_text, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - files=[await attachment.to_file() for attachment in message.attachments] if message.attachments else None, - embeds=message.embeds if message.embeds else None, - ) + try: + webhooks = await message.channel.webhooks() + webhook = discord.utils.get(webhooks, name="UwU Webhook") + if webhook is None: + webhook = await message.channel.create_webhook(name="UwU Webhook") + + # Send UwUized message + await webhook.send( + content=uwu_text, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + files=[await a.to_file() for a in message.attachments] if message.attachments else None, + embeds=message.embeds if message.embeds else None, + ) + except Exception as e: + print(f"UwU webhook failed: {e}") # # UwUize methods From dfef7e30e384d558f00254c4012853ed41515491 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:49:50 +0930 Subject: [PATCH 12/37] h --- uwu/uwu.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 6defb0dd..cc65c0ca 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -13,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.3" + __version__ = "2.3.4" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -131,12 +131,10 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: # @commands.Cog.listener() - async def on_message(self, message: discord.Message): + async def on_message_without_command(self, message: discord.Message): + """Automatically uwu-ize messages in configured channels using webhook.""" if message.author.bot or not message.guild: return - # Skip commands - if message.content.startswith(tuple(self.bot.command_prefix)): - return auto_channels = await self.config.guild(message.guild).auto_channels() if message.channel.id not in auto_channels: From ea8ed27d1039a731eea4c74240f4447d58fd2a54 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:51:35 +0930 Subject: [PATCH 13/37] i --- uwu/uwu.py | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index cc65c0ca..4aedd683 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -13,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.4" + __version__ = "2.3.5" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -149,23 +149,24 @@ async def on_message_without_command(self, message: discord.Message): await message.delete() # Find or create webhook - try: - webhooks = await message.channel.webhooks() - webhook = discord.utils.get(webhooks, name="UwU Webhook") - if webhook is None: - webhook = await message.channel.create_webhook(name="UwU Webhook") - - # Send UwUized message - await webhook.send( - content=uwu_text, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - files=[await a.to_file() for a in message.attachments] if message.attachments else None, - embeds=message.embeds if message.embeds else None, - ) - except Exception as e: - print(f"UwU webhook failed: {e}") + webhook = discord.utils.get(await message.channel.webhooks(), name="UwU Webhook") + if webhook is None: + webhook = await message.channel.create_webhook(name="UwU Webhook") + + # Prepare kwargs + send_kwargs = { + "content": uwu_text, + "username": message.author.display_name, + "avatar_url": message.author.display_avatar.url, + "allowed_mentions": discord.AllowedMentions.none(), + } + if message.attachments: + send_kwargs["files"] = [await a.to_file() for a in message.attachments] + if message.embeds: + send_kwargs["embeds"] = message.embeds + + # Send the UwU message + await webhook.send(**send_kwargs) # # UwUize methods From 5ec88ea414c6ad6768b07eb1d90d9c2d30e22f97 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:54:48 +0930 Subject: [PATCH 14/37] i --- uwu/uwu.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 4aedd683..bae622ac 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -13,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.5" + __version__ = "2.4.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -127,7 +127,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement + # Listener for auto-UwU webhook replacement using type_message # @commands.Cog.listener() @@ -153,20 +153,17 @@ async def on_message_without_command(self, message: discord.Message): if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Prepare kwargs - send_kwargs = { - "content": uwu_text, - "username": message.author.display_name, - "avatar_url": message.author.display_avatar.url, - "allowed_mentions": discord.AllowedMentions.none(), - } - if message.attachments: - send_kwargs["files"] = [await a.to_file() for a in message.attachments] - if message.embeds: - send_kwargs["embeds"] = message.embeds - - # Send the UwU message - await webhook.send(**send_kwargs) + # Use type_message to match ?uwu formatting exactly + await type_message( + message.channel, + uwu_text, + allowed_mentions=discord.AllowedMentions.none(), + webhook=webhook, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + attachments=message.attachments, + embeds=message.embeds, + ) # # UwUize methods From 0b18c4e8195303bdbbf0bb3d8b08fba5bda0e836 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 19:57:15 +0930 Subject: [PATCH 15/37] s --- uwu/uwu.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index bae622ac..2223cfc1 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -13,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.4.0" + __version__ = "2.3.5" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -127,42 +127,44 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement using type_message + # Listener for auto-UwU webhook replacement (fully unified with ?uwu) # @commands.Cog.listener() async def on_message_without_command(self, message: discord.Message): - """Automatically uwu-ize messages in configured channels using webhook.""" - if message.author.bot or not message.guild: + """Automatically uwu-ize messages in configured channels using webhook, matching ?uwu output.""" + if message.author.bot or not message.guild or not message.content: return auto_channels = await self.config.guild(message.guild).auto_channels() if message.channel.id not in auto_channels: return - if not message.content: - return + # UwUize the message content uwu_text = self.uwuize_string(message.content) - # Delete original message + # Delete the original message with suppress(discord.Forbidden, discord.NotFound): await message.delete() - # Find or create webhook + # Find or create the webhook webhook = discord.utils.get(await message.channel.webhooks(), name="UwU Webhook") if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Use type_message to match ?uwu formatting exactly + # Prepare attachments + files = [await a.to_file() for a in message.attachments] if message.attachments else None + + # Send the UwU message using type_message to replicate ?uwu formatting await type_message( message.channel, uwu_text, - allowed_mentions=discord.AllowedMentions.none(), webhook=webhook, username=message.author.display_name, avatar_url=message.author.display_avatar.url, - attachments=message.attachments, - embeds=message.embeds, + allowed_mentions=discord.AllowedMentions.none(), + files=files, + embeds=message.embeds if message.embeds else None, ) # From bdba31cad0f895f6fb59012b0a58384b2af7aa17 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:00:06 +0930 Subject: [PATCH 16/37] s --- uwu/uwu.py | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 2223cfc1..9a0ccf19 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -127,7 +127,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement (fully unified with ?uwu) + # Listener for auto-UwU webhook replacement (fully unified with ?uwu + typing) # @commands.Cog.listener() @@ -140,7 +140,6 @@ async def on_message_without_command(self, message: discord.Message): if message.channel.id not in auto_channels: return - # UwUize the message content uwu_text = self.uwuize_string(message.content) # Delete the original message @@ -155,17 +154,28 @@ async def on_message_without_command(self, message: discord.Message): # Prepare attachments files = [await a.to_file() for a in message.attachments] if message.attachments else None - # Send the UwU message using type_message to replicate ?uwu formatting - await type_message( - message.channel, - uwu_text, - webhook=webhook, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - files=files, - embeds=message.embeds if message.embeds else None, - ) + # Typing simulation: send message in chunks + chunk_size = 50 # adjust chunk size for typing effect + chunks = [uwu_text[i : i + chunk_size] for i in range(0, len(uwu_text), chunk_size)] + for chunk in chunks: + async with message.channel.typing(): + await webhook.send( + content=chunk, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + ) + + # Send attachments and embeds at the end + if files or message.embeds: + await webhook.send( + content="", + files=files, + embeds=message.embeds if message.embeds else None, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + ) # # UwUize methods From c9ccaac3a0b2a1a56d50a2ef7b13d250c987589e Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:01:35 +0930 Subject: [PATCH 17/37] i --- uwu/uwu.py | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 9a0ccf19..850446a6 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -127,12 +127,12 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement (fully unified with ?uwu + typing) + # Listener for auto-UwU webhook replacement (no typing) # @commands.Cog.listener() async def on_message_without_command(self, message: discord.Message): - """Automatically uwu-ize messages in configured channels using webhook, matching ?uwu output.""" + """Automatically uwu-ize messages in configured channels using webhook.""" if message.author.bot or not message.guild or not message.content: return @@ -154,28 +154,15 @@ async def on_message_without_command(self, message: discord.Message): # Prepare attachments files = [await a.to_file() for a in message.attachments] if message.attachments else None - # Typing simulation: send message in chunks - chunk_size = 50 # adjust chunk size for typing effect - chunks = [uwu_text[i : i + chunk_size] for i in range(0, len(uwu_text), chunk_size)] - for chunk in chunks: - async with message.channel.typing(): - await webhook.send( - content=chunk, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - ) - - # Send attachments and embeds at the end - if files or message.embeds: - await webhook.send( - content="", - files=files, - embeds=message.embeds if message.embeds else None, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - ) + # Send the UwU message through the webhook + await webhook.send( + content=uwu_text, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + files=files, + embeds=message.embeds if message.embeds else None, + ) # # UwUize methods From f2d6d98394432f89439baeaaba2315892a6071c5 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:03:45 +0930 Subject: [PATCH 18/37] s --- uwu/uwu.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 850446a6..65a20d3b 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -142,7 +142,7 @@ async def on_message_without_command(self, message: discord.Message): uwu_text = self.uwuize_string(message.content) - # Delete the original message + # Delete original message with suppress(discord.Forbidden, discord.NotFound): await message.delete() @@ -151,18 +151,21 @@ async def on_message_without_command(self, message: discord.Message): if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Prepare attachments - files = [await a.to_file() for a in message.attachments] if message.attachments else None + # Prepare kwargs for webhook.send + send_kwargs = { + "content": uwu_text or "\u200b", # fallback if empty + "username": message.author.display_name, + "avatar_url": message.author.display_avatar.url, + "allowed_mentions": discord.AllowedMentions.none(), + } + + if message.attachments: + send_kwargs["files"] = [await a.to_file() for a in message.attachments] + if message.embeds: + send_kwargs["embeds"] = message.embeds # Send the UwU message through the webhook - await webhook.send( - content=uwu_text, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - files=files, - embeds=message.embeds if message.embeds else None, - ) + await webhook.send(**send_kwargs) # # UwUize methods From 908844f4eb5c31df0ab8e42ce5297b8f5979d49e Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:05:13 +0930 Subject: [PATCH 19/37] s --- uwu/uwu.py | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 65a20d3b..850446a6 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -142,7 +142,7 @@ async def on_message_without_command(self, message: discord.Message): uwu_text = self.uwuize_string(message.content) - # Delete original message + # Delete the original message with suppress(discord.Forbidden, discord.NotFound): await message.delete() @@ -151,21 +151,18 @@ async def on_message_without_command(self, message: discord.Message): if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Prepare kwargs for webhook.send - send_kwargs = { - "content": uwu_text or "\u200b", # fallback if empty - "username": message.author.display_name, - "avatar_url": message.author.display_avatar.url, - "allowed_mentions": discord.AllowedMentions.none(), - } - - if message.attachments: - send_kwargs["files"] = [await a.to_file() for a in message.attachments] - if message.embeds: - send_kwargs["embeds"] = message.embeds + # Prepare attachments + files = [await a.to_file() for a in message.attachments] if message.attachments else None # Send the UwU message through the webhook - await webhook.send(**send_kwargs) + await webhook.send( + content=uwu_text, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + files=files, + embeds=message.embeds if message.embeds else None, + ) # # UwUize methods From 0c4c93b72a6b2ac8b0e7f07d49d2673f8dc6ffb0 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:06:04 +0930 Subject: [PATCH 20/37] h --- uwu/uwu.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 850446a6..9a0ccf19 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -127,12 +127,12 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement (no typing) + # Listener for auto-UwU webhook replacement (fully unified with ?uwu + typing) # @commands.Cog.listener() async def on_message_without_command(self, message: discord.Message): - """Automatically uwu-ize messages in configured channels using webhook.""" + """Automatically uwu-ize messages in configured channels using webhook, matching ?uwu output.""" if message.author.bot or not message.guild or not message.content: return @@ -154,15 +154,28 @@ async def on_message_without_command(self, message: discord.Message): # Prepare attachments files = [await a.to_file() for a in message.attachments] if message.attachments else None - # Send the UwU message through the webhook - await webhook.send( - content=uwu_text, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - files=files, - embeds=message.embeds if message.embeds else None, - ) + # Typing simulation: send message in chunks + chunk_size = 50 # adjust chunk size for typing effect + chunks = [uwu_text[i : i + chunk_size] for i in range(0, len(uwu_text), chunk_size)] + for chunk in chunks: + async with message.channel.typing(): + await webhook.send( + content=chunk, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + ) + + # Send attachments and embeds at the end + if files or message.embeds: + await webhook.send( + content="", + files=files, + embeds=message.embeds if message.embeds else None, + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + ) # # UwUize methods From f917f82a4f2797d52c5345104ce4f5ffbe74777e Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:09:08 +0930 Subject: [PATCH 21/37] i --- uwu/uwu.py | 110 +++++++++++++++++++++++------------------------------ 1 file changed, 47 insertions(+), 63 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 9a0ccf19..de898537 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -13,7 +13,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.5" + __version__ = "2.3.6" # updated version KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -127,7 +127,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Listener for auto-UwU webhook replacement (fully unified with ?uwu + typing) + # Listener for auto-UwU webhook replacement (restored stuttering) # @commands.Cog.listener() @@ -142,40 +142,28 @@ async def on_message_without_command(self, message: discord.Message): uwu_text = self.uwuize_string(message.content) - # Delete the original message + # Delete original message with suppress(discord.Forbidden, discord.NotFound): await message.delete() - # Find or create the webhook + # Find or create webhook webhook = discord.utils.get(await message.channel.webhooks(), name="UwU Webhook") if webhook is None: webhook = await message.channel.create_webhook(name="UwU Webhook") - # Prepare attachments + # Prepare files and embeds files = [await a.to_file() for a in message.attachments] if message.attachments else None - - # Typing simulation: send message in chunks - chunk_size = 50 # adjust chunk size for typing effect - chunks = [uwu_text[i : i + chunk_size] for i in range(0, len(uwu_text), chunk_size)] - for chunk in chunks: - async with message.channel.typing(): - await webhook.send( - content=chunk, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - ) - - # Send attachments and embeds at the end - if files or message.embeds: - await webhook.send( - content="", - files=files, - embeds=message.embeds if message.embeds else None, - username=message.author.display_name, - avatar_url=message.author.display_avatar.url, - allowed_mentions=discord.AllowedMentions.none(), - ) + embeds = message.embeds if message.embeds else None + + # Send final UwU message + await webhook.send( + content=uwu_text or "\u200b", + username=message.author.display_name, + avatar_url=message.author.display_avatar.url, + allowed_mentions=discord.AllowedMentions.none(), + files=files, + embeds=embeds, + ) # # UwUize methods @@ -197,23 +185,29 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - word = word.lower() - uwu = word.rstrip(".?!,") - punctuations = word[len(uwu):] + word_lower = word.lower() + uwu = word_lower.rstrip(".?!,") + punctuations = word_lower[len(uwu):] final_punctuation = punctuations[-1] if punctuations else "" extra_punctuation = punctuations[:-1] if punctuations else "" - if final_punctuation == "." and not random.randint(0, 3): - final_punctuation = random.choice(self.KAOMOJI_JOY) - if final_punctuation == "?" and not random.randint(0, 2): - final_punctuation = random.choice(self.KAOMOJI_CONFUSE) - if final_punctuation == "!" and not random.randint(0, 2): - final_punctuation = random.choice(self.KAOMOJI_JOY) - if final_punctuation == "," and not random.randint(0, 3): - final_punctuation = random.choice(self.KAOMOJI_EMBARRASSED) - if final_punctuation and not random.randint(0, 4): - final_punctuation = random.choice(self.KAOMOJI_SPARKLES) + # Add "stuttering" at random for first letter + if len(uwu) > 2 and uwu[0].isalpha() and random.randint(0, 2) == 0: + uwu = f"{uwu[0]}-{uwu}" + # Replace letters and patterns + uwu = ( + uwu.replace("r", "w") + .replace("l", "w") + .replace("na", "nya") + .replace("ne", "nye") + .replace("ni", "nyi") + .replace("no", "nyo") + .replace("nu", "nyu") + .replace("ove", "uv") + ) + + # Exceptions exceptions = { "you're": "ur", "youre": "ur", @@ -231,27 +225,17 @@ def uwuize_word(self, word: str) -> str: } if uwu in exceptions: uwu = exceptions[uwu] - else: - protected = "" - if uwu.endswith(("le", "ll", "er", "re")): - protected = uwu[-2:] - uwu = uwu[:-2] - elif uwu.endswith(("les", "lls", "ers", "res")): - protected = uwu[-3:] - uwu = uwu[:-3] - uwu = ( - uwu.replace("l", "w") - .replace("r", "w") - .replace("na", "nya") - .replace("ne", "nye") - .replace("ni", "nyi") - .replace("no", "nyo") - .replace("nu", "nyu") - .replace("ove", "uv") - + protected - ) - - if len(uwu) > 2 and uwu[0].isalpha() and "-" not in uwu and not random.randint(0, 6): - uwu = f"{uwu[0]}-{uwu}" + + # Add random kaomojis at the end + if final_punctuation == "." and not random.randint(0, 3): + final_punctuation = random.choice(self.KAOMOJI_JOY) + if final_punctuation == "?" and not random.randint(0, 2): + final_punctuation = random.choice(self.KAOMOJI_CONFUSE) + if final_punctuation == "!" and not random.randint(0, 2): + final_punctuation = random.choice(self.KAOMOJI_JOY) + if final_punctuation == "," and not random.randint(0, 3): + final_punctuation = random.choice(self.KAOMOJI_EMBARRASSED) + if final_punctuation and not random.randint(0, 4): + final_punctuation = random.choice(self.KAOMOJI_SPARKLES) return uwu + extra_punctuation + final_punctuation From 07d211940ced0e8dd171651fe151582c9c81d457 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:11:38 +0930 Subject: [PATCH 22/37] Rewrite --- uwu/uwu.py | 214 ++++++++++++++++++++++++++--------------------------- 1 file changed, 106 insertions(+), 108 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index de898537..eb4e147a 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,19 +1,21 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + UwU channel webhook feature.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + UwU channel webhook feature with webhook caching.""" +# ruff: noqa: S311 import random from contextlib import suppress from typing import ClassVar import discord -from redbot.core import commands, Config -from .pcx_lib import type_message # keep your type_message utility +from redbot.core import commands, Config, checks + +from .pcx_lib import type_message class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.3.6" # updated version + __version__ = "2.3.1" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -43,77 +45,64 @@ class UwU(commands.Cog): " \\*:・゚✧\\*:・゚✧ ", " ☆\\*:・゚ ", "〜☆ ", - " uguu.. ", + " uguu.., ", "-.-", ] def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=1234567890) - self.config.register_guild(auto_channels=[]) + self.config.register_global(uwu_channels={}) + self._webhook_cache: dict[int, discord.Webhook] = {} # # Red methods # def format_help_for_context(self, ctx: commands.Context) -> str: + """Show version in help.""" pre_processed = super().format_help_for_context(ctx) return f"{pre_processed}\n\nCog Version: {self.__version__}" async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> None: + """Nothing to delete.""" return # - # Setup commands + # Command methods # - @commands.guild_only() - @commands.admin_or_permissions(manage_guild=True) - @commands.group(invoke_without_command=True) + @commands.group() + @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup UwU features.""" - await ctx.send_help() - - @uwuset.command(name="addchannel") - async def uwuset_addchannel(self, ctx: commands.Context, channel: discord.TextChannel): - """Add a channel for automatic UwU messages.""" - async with self.config.guild(ctx.guild).auto_channels() as channels: - if channel.id not in channels: - channels.append(channel.id) - await ctx.send(f"Added {channel.mention} to UwU auto channels.") - - @uwuset.command(name="removechannel") - async def uwuset_removechannel(self, ctx: commands.Context, channel: discord.TextChannel): - """Remove a channel from automatic UwU messages.""" - async with self.config.guild(ctx.guild).auto_channels() as channels: - if channel.id in channels: - channels.remove(channel.id) - await ctx.send(f"Removed {channel.mention} from UwU auto channels.") - - @uwuset.command(name="listchannels") - async def uwuset_listchannels(self, ctx: commands.Context): - """List all channels set for automatic UwU messages.""" - channels = await self.config.guild(ctx.guild).auto_channels() - if not channels: - await ctx.send("No channels are set for automatic UwU messages.") - return - mentions = [] - for cid in channels: - ch = ctx.guild.get_channel(cid) - if ch: - mentions.append(ch.mention) - await ctx.send("Automatic UwU channels: " + ", ".join(mentions)) - - # - # Command methods - # + """Setup UwU channel settings.""" + pass + + @uwuset.command(name="channel") + async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): + """Enable UwU auto-messages for a channel.""" + channels = await self.config.uwu_channels() + channels[str(channel.id)] = True + await self.config.uwu_channels.set(channels) + await ctx.send(f"UwU channel set: {channel.mention}") + + @uwuset.command(name="remove") + async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): + """Disable UwU auto-messages for a channel.""" + channels = await self.config.uwu_channels() + channels.pop(str(channel.id), None) + await self.config.uwu_channels.set(channels) + self._webhook_cache.pop(channel.id, None) + await ctx.send(f"UwU channel removed: {channel.mention}") @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: """Uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: - with suppress(discord.Forbidden, discord.NotFound, discord.HTTPException): + with suppress( + discord.Forbidden, discord.NotFound, discord.HTTPException + ): message_id = ctx.message.reference.message_id if message_id: text = (await ctx.fetch_message(message_id)).content @@ -123,53 +112,55 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: await type_message( ctx.channel, self.uwuize_string(text), - allowed_mentions=discord.AllowedMentions(everyone=False, users=False, roles=False), + allowed_mentions=discord.AllowedMentions( + everyone=False, users=False, roles=False + ), ) # - # Listener for auto-UwU webhook replacement (restored stuttering) + # Event listener for auto-UwU channels # @commands.Cog.listener() - async def on_message_without_command(self, message: discord.Message): - """Automatically uwu-ize messages in configured channels using webhook, matching ?uwu output.""" - if message.author.bot or not message.guild or not message.content: + async def on_message(self, message: discord.Message): + if message.author.bot: return - auto_channels = await self.config.guild(message.guild).auto_channels() - if message.channel.id not in auto_channels: + uwu_channels = await self.config.uwu_channels() + if str(message.channel.id) not in uwu_channels: return - uwu_text = self.uwuize_string(message.content) + uwu_content = self.uwuize_string(message.content) # Delete original message - with suppress(discord.Forbidden, discord.NotFound): + with suppress(discord.Forbidden, discord.NotFound, discord.HTTPException): await message.delete() - # Find or create webhook - webhook = discord.utils.get(await message.channel.webhooks(), name="UwU Webhook") - if webhook is None: - webhook = await message.channel.create_webhook(name="UwU Webhook") + # Get or create webhook from cache + webhook = self._webhook_cache.get(message.channel.id) + if not webhook: + webhooks = await message.channel.webhooks() + for wh in webhooks: + if wh.name == "UwU Bot": + webhook = wh + break + if not webhook: + webhook = await message.channel.create_webhook(name="UwU Bot") + self._webhook_cache[message.channel.id] = webhook - # Prepare files and embeds - files = [await a.to_file() for a in message.attachments] if message.attachments else None - embeds = message.embeds if message.embeds else None - - # Send final UwU message await webhook.send( - content=uwu_text or "\u200b", + uwu_content, username=message.author.display_name, avatar_url=message.author.display_avatar.url, allowed_mentions=discord.AllowedMentions.none(), - files=files, - embeds=embeds, ) # - # UwUize methods + # Public methods # def uwuize_string(self, string: str) -> str: + """Uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -185,48 +176,13 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - word_lower = word.lower() - uwu = word_lower.rstrip(".?!,") - punctuations = word_lower[len(uwu):] + """Uwuize and return a word.""" + word = word.lower() + uwu = word.rstrip(".?!,") + punctuations = word[len(uwu) :] final_punctuation = punctuations[-1] if punctuations else "" extra_punctuation = punctuations[:-1] if punctuations else "" - # Add "stuttering" at random for first letter - if len(uwu) > 2 and uwu[0].isalpha() and random.randint(0, 2) == 0: - uwu = f"{uwu[0]}-{uwu}" - - # Replace letters and patterns - uwu = ( - uwu.replace("r", "w") - .replace("l", "w") - .replace("na", "nya") - .replace("ne", "nye") - .replace("ni", "nyi") - .replace("no", "nyo") - .replace("nu", "nyu") - .replace("ove", "uv") - ) - - # Exceptions - exceptions = { - "you're": "ur", - "youre": "ur", - "fuck": "fwickk", - "shit": "poopoo", - "bitch": "meanie", - "asshole": "b-butthole", - "dick": "peenie", - "penis": "peenie", - "cum": "cummies", - "semen": "cummies", - "ass": "b-butt", - "dad": "daddy", - "father": "daddy", - } - if uwu in exceptions: - uwu = exceptions[uwu] - - # Add random kaomojis at the end if final_punctuation == "." and not random.randint(0, 3): final_punctuation = random.choice(self.KAOMOJI_JOY) if final_punctuation == "?" and not random.randint(0, 2): @@ -238,4 +194,46 @@ def uwuize_word(self, word: str) -> str: if final_punctuation and not random.randint(0, 4): final_punctuation = random.choice(self.KAOMOJI_SPARKLES) + if uwu in ("you're", "youre"): + uwu = "ur" + elif uwu == "fuck": + uwu = "fwickk" + elif uwu == "shit": + uwu = "poopoo" + elif uwu == "bitch": + uwu = "meanie" + elif uwu == "asshole": + uwu = "b-butthole" + elif uwu in ("dick", "penis"): + uwu = "peenie" + elif uwu in ("cum", "semen"): + uwu = "cummies" + elif uwu == "ass": + uwu = "b-butt" + elif uwu in ("dad", "father"): + uwu = "daddy" + else: + protected = "" + if uwu.endswith(("le", "ll", "er", "re")): + protected = uwu[-2:] + uwu = uwu[:-2] + elif uwu.endswith(("les", "lls", "ers", "res")): + protected = uwu[-3:] + uwu = uwu[:-3] + + uwu = ( + uwu.replace("l", "w") + .replace("r", "w") + .replace("na", "nya") + .replace("ne", "nye") + .replace("ni", "nyi") + .replace("no", "nyo") + .replace("nu", "nyu") + .replace("ove", "uv") + + protected + ) + + if len(uwu) > 2 and uwu[0].isalpha() and "-" not in uwu and not random.randint(0, 6): + uwu = f"{uwu[0]}-{uwu}" + return uwu + extra_punctuation + final_punctuation From 53ab41415752ea66dab7054b9ed2f27964762b32 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:14:22 +0930 Subject: [PATCH 23/37] credits --- uwu/uwu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index eb4e147a..fcea916b 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + UwU channel webhook feature with webhook caching.""" +"""UwU cog for Red-DiscordBot by PhasecoreX.""" # ruff: noqa: S311 import random @@ -14,7 +14,7 @@ class UwU(commands.Cog): """UwU.""" - __author__ = "PhasecoreX + Didi" + __author__ = "PhasecoreX + Didi (For the channel feature)" __version__ = "2.3.1" KAOMOJI_JOY: ClassVar[list[str]] = [ From 4e7956270c39dd5a4320bb9bcbf6e8507980040e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 10:46:05 +0000 Subject: [PATCH 24/37] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uwu/__init__.py | 3 ++- uwu/uwu.py | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/uwu/__init__.py b/uwu/__init__.py index 5602d0ed..2c14c732 100644 --- a/uwu/__init__.py +++ b/uwu/__init__.py @@ -2,7 +2,9 @@ import json from pathlib import Path + from redbot.core.bot import Red + from .uwu import UwU with Path(__file__).parent.joinpath("info.json").open() as fp: @@ -11,4 +13,3 @@ async def setup(bot): await bot.add_cog(UwU(bot)) - diff --git a/uwu/uwu.py b/uwu/uwu.py index fcea916b..95540c86 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -6,7 +6,7 @@ from typing import ClassVar import discord -from redbot.core import commands, Config, checks +from redbot.core import Config, checks, commands from .pcx_lib import type_message @@ -76,7 +76,6 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @checks.is_owner() async def uwuset(self, ctx: commands.Context): """Setup UwU channel settings.""" - pass @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): @@ -233,7 +232,12 @@ def uwuize_word(self, word: str) -> str: + protected ) - if len(uwu) > 2 and uwu[0].isalpha() and "-" not in uwu and not random.randint(0, 6): + if ( + len(uwu) > 2 + and uwu[0].isalpha() + and "-" not in uwu + and not random.randint(0, 6) + ): uwu = f"{uwu[0]}-{uwu}" return uwu + extra_punctuation + final_punctuation From 9acc5bf955f06ddcb8e8019c6ec6decd62f7bdf7 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:40:52 +0930 Subject: [PATCH 25/37] Added the user command --- uwu/uwu.py | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 95540c86..368a092e 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle.""" # ruff: noqa: S311 import random @@ -14,8 +14,8 @@ class UwU(commands.Cog): """UwU.""" - __author__ = "PhasecoreX + Didi (For the channel feature)" - __version__ = "2.3.1" + __author__ = "PhasecoreX + Didi" + __version__ = "2.4.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -53,6 +53,8 @@ def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=1234567890) self.config.register_global(uwu_channels={}) + # Per-guild user toggles + self.config.register_guild(user_uwu_toggle={}) self._webhook_cache: dict[int, discord.Webhook] = {} # @@ -94,6 +96,26 @@ async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChanne self._webhook_cache.pop(channel.id, None) await ctx.send(f"UwU channel removed: {channel.mention}") + @commands.group() + async def uwuuser(self, ctx: commands.Context): + """Toggle per-user UwU webhook in this server.""" + + @uwuuser.command(name="enable") + async def uwuuser_enable(self, ctx: commands.Context): + """Enable UwU webhook for yourself in this server.""" + data = await self.config.guild(ctx.guild).user_uwu_toggle() + data[str(ctx.author.id)] = True + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook enabled for you in this server!") + + @uwuuser.command(name="disable") + async def uwuuser_disable(self, ctx: commands.Context): + """Disable UwU webhook for yourself in this server.""" + data = await self.config.guild(ctx.guild).user_uwu_toggle() + data.pop(str(ctx.author.id), None) + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook disabled for you in this server!") + @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: """Uwuize the replied to message, previous message, or your own text.""" @@ -126,7 +148,10 @@ async def on_message(self, message: discord.Message): return uwu_channels = await self.config.uwu_channels() - if str(message.channel.id) not in uwu_channels: + user_toggle = await self.config.guild(message.guild).user_uwu_toggle() + user_enabled = user_toggle.get(str(message.author.id), False) + + if not (str(message.channel.id) in uwu_channels or user_enabled): return uwu_content = self.uwuize_string(message.content) From 971aed2df2c09f05a9a310f4786de2cc12a5adc9 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:46:16 +0930 Subject: [PATCH 26/37] more functions --- uwu/uwu.py | 83 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 64 insertions(+), 19 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 368a092e..f7f1dfc7 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" # ruff: noqa: S311 import random @@ -15,7 +15,7 @@ class UwU(commands.Cog): """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.4.0" + __version__ = "2.5.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -54,7 +54,10 @@ def __init__(self, bot): self.config = Config.get_conf(self, identifier=1234567890) self.config.register_global(uwu_channels={}) # Per-guild user toggles - self.config.register_guild(user_uwu_toggle={}) + self.config.register_guild( + user_uwu_toggle={}, # User opt-in + admin_override={} # Admin-forced UwU + ) self._webhook_cache: dict[int, discord.Webhook] = {} # @@ -100,21 +103,57 @@ async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChanne async def uwuuser(self, ctx: commands.Context): """Toggle per-user UwU webhook in this server.""" - @uwuuser.command(name="enable") - async def uwuuser_enable(self, ctx: commands.Context): - """Enable UwU webhook for yourself in this server.""" - data = await self.config.guild(ctx.guild).user_uwu_toggle() - data[str(ctx.author.id)] = True - await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook enabled for you in this server!") + @uwuuser.command(name="toggle") + async def uwuuser_toggle(self, ctx: commands.Context): + """Enable or disable UwU webhook for yourself in this server.""" + admin_override = await self.config.guild(ctx.guild).admin_override() + if str(ctx.author.id) in admin_override: + return await ctx.send("Admin has forced UwU for you; you cannot disable it.") - @uwuuser.command(name="disable") - async def uwuuser_disable(self, ctx: commands.Context): - """Disable UwU webhook for yourself in this server.""" data = await self.config.guild(ctx.guild).user_uwu_toggle() - data.pop(str(ctx.author.id), None) - await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook disabled for you in this server!") + if str(ctx.author.id) in data: + data.pop(str(ctx.author.id)) + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook disabled for you in this server.") + else: + data[str(ctx.author.id)] = True + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook enabled for you in this server.") + + @uwuuser.command(name="list") + @checks.mod() + async def uwuuser_list(self, ctx: commands.Context): + """List users with per-user UwU enabled or admin-forced.""" + data = await self.config.guild(ctx.guild).user_uwu_toggle() + admin_override = await self.config.guild(ctx.guild).admin_override() + if not data and not admin_override: + return await ctx.send("No users have per-user UwU enabled.") + lines = [] + for uid in set(list(data.keys()) + list(admin_override.keys())): + member = ctx.guild.get_member(int(uid)) + name = member.display_name if member else f"User ID {uid}" + status = "Admin-forced" if uid in admin_override else "User-enabled" + lines.append(f"{name} — {status}") + await ctx.send("\n".join(lines)) + + @uwuuser.command(name="admin") + @checks.mod() + async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): + """Toggle admin-forced UwU for a user.""" + admin_override = await self.config.guild(ctx.guild).admin_override() + uid = str(member.id) + if uid in admin_override: + admin_override.pop(uid) + await self.config.guild(ctx.guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") + else: + admin_override[uid] = True + # Also remove user opt-in to prevent conflicts + user_toggle = await self.config.guild(ctx.guild).user_uwu_toggle() + user_toggle.pop(uid, None) + await self.config.guild(ctx.guild).user_uwu_toggle.set(user_toggle) + await self.config.guild(ctx.guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced UwU enabled for {member.display_name}.") @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @@ -144,14 +183,20 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: @commands.Cog.listener() async def on_message(self, message: discord.Message): - if message.author.bot: + if message.author.bot or not message.guild: return uwu_channels = await self.config.uwu_channels() user_toggle = await self.config.guild(message.guild).user_uwu_toggle() - user_enabled = user_toggle.get(str(message.author.id), False) + admin_override = await self.config.guild(message.guild).admin_override() + + is_enabled = ( + str(message.channel.id) in uwu_channels + or str(message.author.id) in user_toggle + or str(message.author.id) in admin_override + ) - if not (str(message.channel.id) in uwu_channels or user_enabled): + if not is_enabled: return uwu_content = self.uwuize_string(message.content) From 5728fa5199cd4d3341ace4dde56d1fa74b4cfd31 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:17:06 +0000 Subject: [PATCH 27/37] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uwu/uwu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index f7f1dfc7..ec4abaab 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -55,8 +55,7 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( - user_uwu_toggle={}, # User opt-in - admin_override={} # Admin-forced UwU + user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -108,7 +107,9 @@ async def uwuuser_toggle(self, ctx: commands.Context): """Enable or disable UwU webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: - return await ctx.send("Admin has forced UwU for you; you cannot disable it.") + return await ctx.send( + "Admin has forced UwU for you; you cannot disable it." + ) data = await self.config.guild(ctx.guild).user_uwu_toggle() if str(ctx.author.id) in data: From e5bb1381affc007c062cb92d7c632ba671c4c0d9 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:56:56 +0930 Subject: [PATCH 28/37] better cmds --- uwu/uwu.py | 127 +++++++++++++++++++++++++---------------------------- 1 file changed, 61 insertions(+), 66 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index ec4abaab..876e14ea 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" +"""uwu cog for Red-DiscordBot by PhasecoreX + Didi + per-user toggle + admin overrides.""" # ruff: noqa: S311 import random @@ -11,11 +11,11 @@ from .pcx_lib import type_message -class UwU(commands.Cog): - """UwU.""" +class uwu(commands.Cog): + """uwu.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.5.0" + __version__ = "2.6.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -53,9 +53,9 @@ def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=1234567890) self.config.register_global(uwu_channels={}) - # Per-guild user toggles self.config.register_guild( - user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU + user_uwu_toggle={}, # User opt-in + admin_override={} # Admin-forced uwu ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -79,86 +79,81 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group() @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup UwU channel settings.""" + """Setup uwu channel settings.""" @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): - """Enable UwU auto-messages for a channel.""" + """Enable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels[str(channel.id)] = True await self.config.uwu_channels.set(channels) - await ctx.send(f"UwU channel set: {channel.mention}") + await ctx.send(f"uwu channel set: {channel.mention}") @uwuset.command(name="remove") async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): - """Disable UwU auto-messages for a channel.""" + """Disable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels.pop(str(channel.id), None) await self.config.uwu_channels.set(channels) self._webhook_cache.pop(channel.id, None) - await ctx.send(f"UwU channel removed: {channel.mention}") - - @commands.group() - async def uwuuser(self, ctx: commands.Context): - """Toggle per-user UwU webhook in this server.""" - - @uwuuser.command(name="toggle") - async def uwuuser_toggle(self, ctx: commands.Context): - """Enable or disable UwU webhook for yourself in this server.""" - admin_override = await self.config.guild(ctx.guild).admin_override() - if str(ctx.author.id) in admin_override: - return await ctx.send( - "Admin has forced UwU for you; you cannot disable it." - ) + await ctx.send(f"uwu channel removed: {channel.mention}") + + @commands.command() + async def uwutoggle(self, ctx: commands.Context, member: discord.Member | None = None): + """Toggle uwu for yourself or, if admin, for another member.""" + guild = ctx.guild + user_toggle = await self.config.guild(guild).user_uwu_toggle() + admin_override = await self.config.guild(guild).admin_override() + + # Admin toggling someone else + if member and (ctx.author.guild_permissions.manage_guild or ctx.author == guild.owner): + uid = str(member.id) + if uid in admin_override: + admin_override.pop(uid) + await self.config.guild(guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced uwu disabled for {member.display_name}.") + else: + admin_override[uid] = True + # Remove user opt-in to avoid conflicts + user_toggle.pop(uid, None) + await self.config.guild(guild).user_uwu_toggle.set(user_toggle) + await self.config.guild(guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") + return - data = await self.config.guild(ctx.guild).user_uwu_toggle() - if str(ctx.author.id) in data: - data.pop(str(ctx.author.id)) - await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook disabled for you in this server.") + # Regular user toggling self + uid = str(ctx.author.id) + if uid in admin_override: + return await ctx.send("Admin has forced uwu for you; you cannot disable it.") + if uid in user_toggle: + user_toggle.pop(uid) + await self.config.guild(guild).user_uwu_toggle.set(user_toggle) + await ctx.send("uwu disabled for you in this server.") else: - data[str(ctx.author.id)] = True - await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook enabled for you in this server.") + user_toggle[uid] = True + await self.config.guild(guild).user_uwu_toggle.set(user_toggle) + await ctx.send("uwu enabled for you in this server.") - @uwuuser.command(name="list") + @commands.command() @checks.mod() - async def uwuuser_list(self, ctx: commands.Context): - """List users with per-user UwU enabled or admin-forced.""" - data = await self.config.guild(ctx.guild).user_uwu_toggle() - admin_override = await self.config.guild(ctx.guild).admin_override() - if not data and not admin_override: - return await ctx.send("No users have per-user UwU enabled.") + async def uwulist(self, ctx: commands.Context): + """List users with per-user uwu enabled or admin-forced.""" + guild = ctx.guild + user_toggle = await self.config.guild(guild).user_uwu_toggle() + admin_override = await self.config.guild(guild).admin_override() + if not user_toggle and not admin_override: + return await ctx.send("No users have per-user uwu enabled.") lines = [] - for uid in set(list(data.keys()) + list(admin_override.keys())): - member = ctx.guild.get_member(int(uid)) + for uid in set(list(user_toggle.keys()) + list(admin_override.keys())): + member = guild.get_member(int(uid)) name = member.display_name if member else f"User ID {uid}" status = "Admin-forced" if uid in admin_override else "User-enabled" lines.append(f"{name} — {status}") await ctx.send("\n".join(lines)) - @uwuuser.command(name="admin") - @checks.mod() - async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): - """Toggle admin-forced UwU for a user.""" - admin_override = await self.config.guild(ctx.guild).admin_override() - uid = str(member.id) - if uid in admin_override: - admin_override.pop(uid) - await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") - else: - admin_override[uid] = True - # Also remove user opt-in to prevent conflicts - user_toggle = await self.config.guild(ctx.guild).user_uwu_toggle() - user_toggle.pop(uid, None) - await self.config.guild(ctx.guild).user_uwu_toggle.set(user_toggle) - await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced UwU enabled for {member.display_name}.") - @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: - """Uwuize the replied to message, previous message, or your own text.""" + """uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: with suppress( @@ -179,7 +174,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Event listener for auto-UwU channels + # Event listener for auto-uwu channels # @commands.Cog.listener() @@ -211,11 +206,11 @@ async def on_message(self, message: discord.Message): if not webhook: webhooks = await message.channel.webhooks() for wh in webhooks: - if wh.name == "UwU Bot": + if wh.name == "uwu Bot": webhook = wh break if not webhook: - webhook = await message.channel.create_webhook(name="UwU Bot") + webhook = await message.channel.create_webhook(name="uwu Bot") self._webhook_cache[message.channel.id] = webhook await webhook.send( @@ -230,7 +225,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """Uwuize and return a string.""" + """uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -246,7 +241,7 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """Uwuize and return a word.""" + """uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") punctuations = word[len(uwu) :] From 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:27:05 +0000 Subject: [PATCH 29/37] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uwu/uwu.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 876e14ea..00c7fab6 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -54,8 +54,7 @@ def __init__(self, bot): self.config = Config.get_conf(self, identifier=1234567890) self.config.register_global(uwu_channels={}) self.config.register_guild( - user_uwu_toggle={}, # User opt-in - admin_override={} # Admin-forced uwu + user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced uwu ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -99,14 +98,18 @@ async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChanne await ctx.send(f"uwu channel removed: {channel.mention}") @commands.command() - async def uwutoggle(self, ctx: commands.Context, member: discord.Member | None = None): + async def uwutoggle( + self, ctx: commands.Context, member: discord.Member | None = None + ): """Toggle uwu for yourself or, if admin, for another member.""" guild = ctx.guild user_toggle = await self.config.guild(guild).user_uwu_toggle() admin_override = await self.config.guild(guild).admin_override() # Admin toggling someone else - if member and (ctx.author.guild_permissions.manage_guild or ctx.author == guild.owner): + if member and ( + ctx.author.guild_permissions.manage_guild or ctx.author == guild.owner + ): uid = str(member.id) if uid in admin_override: admin_override.pop(uid) @@ -119,12 +122,14 @@ async def uwutoggle(self, ctx: commands.Context, member: discord.Member | None = await self.config.guild(guild).user_uwu_toggle.set(user_toggle) await self.config.guild(guild).admin_override.set(admin_override) await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") - return + return None # Regular user toggling self uid = str(ctx.author.id) if uid in admin_override: - return await ctx.send("Admin has forced uwu for you; you cannot disable it.") + return await ctx.send( + "Admin has forced uwu for you; you cannot disable it." + ) if uid in user_toggle: user_toggle.pop(uid) await self.config.guild(guild).user_uwu_toggle.set(user_toggle) @@ -153,7 +158,7 @@ async def uwulist(self, ctx: commands.Context): @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: - """uwuize the replied to message, previous message, or your own text.""" + """Uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: with suppress( @@ -225,7 +230,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """uwuize and return a string.""" + """Uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -241,7 +246,7 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """uwuize and return a word.""" + """Uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") punctuations = word[len(uwu) :] From 88cba7f8e4b5399a32128e46dd5b58bd5ffc5621 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:59:10 +0930 Subject: [PATCH 30/37] Revert --- uwu/uwu.py | 101 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 74 insertions(+), 27 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 00c7fab6..6c9b3035 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""uwu cog for Red-DiscordBot by PhasecoreX + Didi + per-user toggle + admin overrides.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" # ruff: noqa: S311 import random @@ -11,11 +11,11 @@ from .pcx_lib import type_message -class uwu(commands.Cog): - """uwu.""" +class UwU(commands.Cog): + """UwU.""" __author__ = "PhasecoreX + Didi" - __version__ = "2.6.0" + __version__ = "2.5.0" KAOMOJI_JOY: ClassVar[list[str]] = [ " (\\* ^ ω ^)", @@ -53,8 +53,14 @@ def __init__(self, bot): self.bot = bot self.config = Config.get_conf(self, identifier=1234567890) self.config.register_global(uwu_channels={}) + # Per-guild user toggles self.config.register_guild( +<<<<<<< HEAD + user_uwu_toggle={}, # User opt-in + admin_override={} # Admin-forced UwU +======= user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced uwu +>>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -78,25 +84,30 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group() @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup uwu channel settings.""" + """Setup UwU channel settings.""" @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): - """Enable uwu auto-messages for a channel.""" + """Enable UwU auto-messages for a channel.""" channels = await self.config.uwu_channels() channels[str(channel.id)] = True await self.config.uwu_channels.set(channels) - await ctx.send(f"uwu channel set: {channel.mention}") + await ctx.send(f"UwU channel set: {channel.mention}") @uwuset.command(name="remove") async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): - """Disable uwu auto-messages for a channel.""" + """Disable UwU auto-messages for a channel.""" channels = await self.config.uwu_channels() channels.pop(str(channel.id), None) await self.config.uwu_channels.set(channels) self._webhook_cache.pop(channel.id, None) - await ctx.send(f"uwu channel removed: {channel.mention}") + await ctx.send(f"UwU channel removed: {channel.mention}") +<<<<<<< HEAD + @commands.group() + async def uwuuser(self, ctx: commands.Context): + """Toggle per-user UwU webhook in this server.""" +======= @commands.command() async def uwutoggle( self, ctx: commands.Context, member: discord.Member | None = None @@ -105,7 +116,16 @@ async def uwutoggle( guild = ctx.guild user_toggle = await self.config.guild(guild).user_uwu_toggle() admin_override = await self.config.guild(guild).admin_override() - +>>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 + +<<<<<<< HEAD + @uwuuser.command(name="toggle") + async def uwuuser_toggle(self, ctx: commands.Context): + """Enable or disable UwU webhook for yourself in this server.""" + admin_override = await self.config.guild(ctx.guild).admin_override() + if str(ctx.author.id) in admin_override: + return await ctx.send("Admin has forced UwU for you; you cannot disable it.") +======= # Admin toggling someone else if member and ( ctx.author.guild_permissions.manage_guild or ctx.author == guild.owner @@ -123,7 +143,15 @@ async def uwutoggle( await self.config.guild(guild).admin_override.set(admin_override) await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") return None - +>>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 + +<<<<<<< HEAD + data = await self.config.guild(ctx.guild).user_uwu_toggle() + if str(ctx.author.id) in data: + data.pop(str(ctx.author.id)) + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook disabled for you in this server.") +======= # Regular user toggling self uid = str(ctx.author.id) if uid in admin_override: @@ -134,28 +162,47 @@ async def uwutoggle( user_toggle.pop(uid) await self.config.guild(guild).user_uwu_toggle.set(user_toggle) await ctx.send("uwu disabled for you in this server.") +>>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 else: - user_toggle[uid] = True - await self.config.guild(guild).user_uwu_toggle.set(user_toggle) - await ctx.send("uwu enabled for you in this server.") + data[str(ctx.author.id)] = True + await self.config.guild(ctx.guild).user_uwu_toggle.set(data) + await ctx.send("UwU webhook enabled for you in this server.") - @commands.command() + @uwuuser.command(name="list") @checks.mod() - async def uwulist(self, ctx: commands.Context): - """List users with per-user uwu enabled or admin-forced.""" - guild = ctx.guild - user_toggle = await self.config.guild(guild).user_uwu_toggle() - admin_override = await self.config.guild(guild).admin_override() - if not user_toggle and not admin_override: - return await ctx.send("No users have per-user uwu enabled.") + async def uwuuser_list(self, ctx: commands.Context): + """List users with per-user UwU enabled or admin-forced.""" + data = await self.config.guild(ctx.guild).user_uwu_toggle() + admin_override = await self.config.guild(ctx.guild).admin_override() + if not data and not admin_override: + return await ctx.send("No users have per-user UwU enabled.") lines = [] - for uid in set(list(user_toggle.keys()) + list(admin_override.keys())): - member = guild.get_member(int(uid)) + for uid in set(list(data.keys()) + list(admin_override.keys())): + member = ctx.guild.get_member(int(uid)) name = member.display_name if member else f"User ID {uid}" status = "Admin-forced" if uid in admin_override else "User-enabled" lines.append(f"{name} — {status}") await ctx.send("\n".join(lines)) + @uwuuser.command(name="admin") + @checks.mod() + async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): + """Toggle admin-forced UwU for a user.""" + admin_override = await self.config.guild(ctx.guild).admin_override() + uid = str(member.id) + if uid in admin_override: + admin_override.pop(uid) + await self.config.guild(ctx.guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") + else: + admin_override[uid] = True + # Also remove user opt-in to prevent conflicts + user_toggle = await self.config.guild(ctx.guild).user_uwu_toggle() + user_toggle.pop(uid, None) + await self.config.guild(ctx.guild).user_uwu_toggle.set(user_toggle) + await self.config.guild(ctx.guild).admin_override.set(admin_override) + await ctx.send(f"Admin-forced UwU enabled for {member.display_name}.") + @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: """Uwuize the replied to message, previous message, or your own text.""" @@ -179,7 +226,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Event listener for auto-uwu channels + # Event listener for auto-UwU channels # @commands.Cog.listener() @@ -211,11 +258,11 @@ async def on_message(self, message: discord.Message): if not webhook: webhooks = await message.channel.webhooks() for wh in webhooks: - if wh.name == "uwu Bot": + if wh.name == "UwU Bot": webhook = wh break if not webhook: - webhook = await message.channel.create_webhook(name="uwu Bot") + webhook = await message.channel.create_webhook(name="UwU Bot") self._webhook_cache[message.channel.id] = webhook await webhook.send( From 7412f9e3d8bb9cb996c9b894314b4d53fba2097c Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 21:59:32 +0930 Subject: [PATCH 31/37] idk waht im doing --- uwu/uwu.py | 52 ++-------------------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 6c9b3035..f7f1dfc7 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -55,12 +55,8 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( -<<<<<<< HEAD user_uwu_toggle={}, # User opt-in admin_override={} # Admin-forced UwU -======= - user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced uwu ->>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -103,66 +99,22 @@ async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChanne self._webhook_cache.pop(channel.id, None) await ctx.send(f"UwU channel removed: {channel.mention}") -<<<<<<< HEAD @commands.group() async def uwuuser(self, ctx: commands.Context): """Toggle per-user UwU webhook in this server.""" -======= - @commands.command() - async def uwutoggle( - self, ctx: commands.Context, member: discord.Member | None = None - ): - """Toggle uwu for yourself or, if admin, for another member.""" - guild = ctx.guild - user_toggle = await self.config.guild(guild).user_uwu_toggle() - admin_override = await self.config.guild(guild).admin_override() ->>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 - -<<<<<<< HEAD + @uwuuser.command(name="toggle") async def uwuuser_toggle(self, ctx: commands.Context): """Enable or disable UwU webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: return await ctx.send("Admin has forced UwU for you; you cannot disable it.") -======= - # Admin toggling someone else - if member and ( - ctx.author.guild_permissions.manage_guild or ctx.author == guild.owner - ): - uid = str(member.id) - if uid in admin_override: - admin_override.pop(uid) - await self.config.guild(guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced uwu disabled for {member.display_name}.") - else: - admin_override[uid] = True - # Remove user opt-in to avoid conflicts - user_toggle.pop(uid, None) - await self.config.guild(guild).user_uwu_toggle.set(user_toggle) - await self.config.guild(guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") - return None ->>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 - -<<<<<<< HEAD + data = await self.config.guild(ctx.guild).user_uwu_toggle() if str(ctx.author.id) in data: data.pop(str(ctx.author.id)) await self.config.guild(ctx.guild).user_uwu_toggle.set(data) await ctx.send("UwU webhook disabled for you in this server.") -======= - # Regular user toggling self - uid = str(ctx.author.id) - if uid in admin_override: - return await ctx.send( - "Admin has forced uwu for you; you cannot disable it." - ) - if uid in user_toggle: - user_toggle.pop(uid) - await self.config.guild(guild).user_uwu_toggle.set(user_toggle) - await ctx.send("uwu disabled for you in this server.") ->>>>>>> 8b763b8c7cfc595ea45cbda7a4c228c7c4139001 else: data[str(ctx.author.id)] = True await self.config.guild(ctx.guild).user_uwu_toggle.set(data) From 2dd8af06019f6eb700ffd4c155ee383528283d7c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:30:52 +0000 Subject: [PATCH 32/37] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uwu/uwu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index f7f1dfc7..ec4abaab 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -55,8 +55,7 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( - user_uwu_toggle={}, # User opt-in - admin_override={} # Admin-forced UwU + user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -108,7 +107,9 @@ async def uwuuser_toggle(self, ctx: commands.Context): """Enable or disable UwU webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: - return await ctx.send("Admin has forced UwU for you; you cannot disable it.") + return await ctx.send( + "Admin has forced UwU for you; you cannot disable it." + ) data = await self.config.guild(ctx.guild).user_uwu_toggle() if str(ctx.author.id) in data: From f1526c59f2bc9b384613291492f65578ae10a68f Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 22:12:19 +0930 Subject: [PATCH 33/37] Made the uwus consistant --- uwu/uwu.py | 55 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index ec4abaab..5159d4bc 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" +"""uwu cog for Red-DiscordBot by PhasecoreX + Didi (Toggle for users and channels)""" # ruff: noqa: S311 import random @@ -11,8 +11,8 @@ from .pcx_lib import type_message -class UwU(commands.Cog): - """UwU.""" +class uwu(commands.Cog): + """uwu.""" __author__ = "PhasecoreX + Didi" __version__ = "2.5.0" @@ -55,7 +55,12 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( +<<<<<<< HEAD + user_uwu_toggle={}, # User opt-in + admin_override={} # Admin-forced uwu +======= user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU +>>>>>>> 2dd8af06019f6eb700ffd4c155ee383528283d7c ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -79,56 +84,60 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group() @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup UwU channel settings.""" + """Setup uwu channel settings.""" @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): - """Enable UwU auto-messages for a channel.""" + """Enable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels[str(channel.id)] = True await self.config.uwu_channels.set(channels) - await ctx.send(f"UwU channel set: {channel.mention}") + await ctx.send(f"uwu channel set: {channel.mention}") @uwuset.command(name="remove") async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): - """Disable UwU auto-messages for a channel.""" + """Disable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels.pop(str(channel.id), None) await self.config.uwu_channels.set(channels) self._webhook_cache.pop(channel.id, None) - await ctx.send(f"UwU channel removed: {channel.mention}") + await ctx.send(f"uwu channel removed: {channel.mention}") @commands.group() async def uwuuser(self, ctx: commands.Context): - """Toggle per-user UwU webhook in this server.""" + """Toggle per-user uwu webhook in this server.""" @uwuuser.command(name="toggle") async def uwuuser_toggle(self, ctx: commands.Context): - """Enable or disable UwU webhook for yourself in this server.""" + """Enable or disable uwu webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: +<<<<<<< HEAD + return await ctx.send("Admin has forced uwu for you; you cannot disable it.") +======= return await ctx.send( "Admin has forced UwU for you; you cannot disable it." ) +>>>>>>> 2dd8af06019f6eb700ffd4c155ee383528283d7c data = await self.config.guild(ctx.guild).user_uwu_toggle() if str(ctx.author.id) in data: data.pop(str(ctx.author.id)) await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook disabled for you in this server.") + await ctx.send("uwu webhook disabled for you in this server.") else: data[str(ctx.author.id)] = True await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("UwU webhook enabled for you in this server.") + await ctx.send("uwu webhook enabled for you in this server.") @uwuuser.command(name="list") @checks.mod() async def uwuuser_list(self, ctx: commands.Context): - """List users with per-user UwU enabled or admin-forced.""" + """List users with per-user uwu enabled or admin-forced.""" data = await self.config.guild(ctx.guild).user_uwu_toggle() admin_override = await self.config.guild(ctx.guild).admin_override() if not data and not admin_override: - return await ctx.send("No users have per-user UwU enabled.") + return await ctx.send("No users have per-user uwu enabled.") lines = [] for uid in set(list(data.keys()) + list(admin_override.keys())): member = ctx.guild.get_member(int(uid)) @@ -140,13 +149,13 @@ async def uwuuser_list(self, ctx: commands.Context): @uwuuser.command(name="admin") @checks.mod() async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): - """Toggle admin-forced UwU for a user.""" + """Toggle admin-forced uwu for a user.""" admin_override = await self.config.guild(ctx.guild).admin_override() uid = str(member.id) if uid in admin_override: admin_override.pop(uid) await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") + await ctx.send(f"Admin-forced uwu disabled for {member.display_name}.") else: admin_override[uid] = True # Also remove user opt-in to prevent conflicts @@ -154,11 +163,11 @@ async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): user_toggle.pop(uid, None) await self.config.guild(ctx.guild).user_uwu_toggle.set(user_toggle) await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced UwU enabled for {member.display_name}.") + await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: - """Uwuize the replied to message, previous message, or your own text.""" + """uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: with suppress( @@ -179,7 +188,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Event listener for auto-UwU channels + # Event listener for auto-uwu channels # @commands.Cog.listener() @@ -211,11 +220,11 @@ async def on_message(self, message: discord.Message): if not webhook: webhooks = await message.channel.webhooks() for wh in webhooks: - if wh.name == "UwU Bot": + if wh.name == "uwu Bot": webhook = wh break if not webhook: - webhook = await message.channel.create_webhook(name="UwU Bot") + webhook = await message.channel.create_webhook(name="uwu Bot") self._webhook_cache[message.channel.id] = webhook await webhook.send( @@ -230,7 +239,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """Uwuize and return a string.""" + """uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -246,7 +255,7 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """Uwuize and return a word.""" + """uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") punctuations = word[len(uwu) :] From 766ff7a753b1df5c890c20d33641facc89301755 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 22:14:58 +0930 Subject: [PATCH 34/37] revert --- uwu/uwu.py | 55 +++++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 5159d4bc..ec4abaab 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""uwu cog for Red-DiscordBot by PhasecoreX + Didi (Toggle for users and channels)""" +"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" # ruff: noqa: S311 import random @@ -11,8 +11,8 @@ from .pcx_lib import type_message -class uwu(commands.Cog): - """uwu.""" +class UwU(commands.Cog): + """UwU.""" __author__ = "PhasecoreX + Didi" __version__ = "2.5.0" @@ -55,12 +55,7 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( -<<<<<<< HEAD - user_uwu_toggle={}, # User opt-in - admin_override={} # Admin-forced uwu -======= user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU ->>>>>>> 2dd8af06019f6eb700ffd4c155ee383528283d7c ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -84,60 +79,56 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group() @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup uwu channel settings.""" + """Setup UwU channel settings.""" @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): - """Enable uwu auto-messages for a channel.""" + """Enable UwU auto-messages for a channel.""" channels = await self.config.uwu_channels() channels[str(channel.id)] = True await self.config.uwu_channels.set(channels) - await ctx.send(f"uwu channel set: {channel.mention}") + await ctx.send(f"UwU channel set: {channel.mention}") @uwuset.command(name="remove") async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): - """Disable uwu auto-messages for a channel.""" + """Disable UwU auto-messages for a channel.""" channels = await self.config.uwu_channels() channels.pop(str(channel.id), None) await self.config.uwu_channels.set(channels) self._webhook_cache.pop(channel.id, None) - await ctx.send(f"uwu channel removed: {channel.mention}") + await ctx.send(f"UwU channel removed: {channel.mention}") @commands.group() async def uwuuser(self, ctx: commands.Context): - """Toggle per-user uwu webhook in this server.""" + """Toggle per-user UwU webhook in this server.""" @uwuuser.command(name="toggle") async def uwuuser_toggle(self, ctx: commands.Context): - """Enable or disable uwu webhook for yourself in this server.""" + """Enable or disable UwU webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: -<<<<<<< HEAD - return await ctx.send("Admin has forced uwu for you; you cannot disable it.") -======= return await ctx.send( "Admin has forced UwU for you; you cannot disable it." ) ->>>>>>> 2dd8af06019f6eb700ffd4c155ee383528283d7c data = await self.config.guild(ctx.guild).user_uwu_toggle() if str(ctx.author.id) in data: data.pop(str(ctx.author.id)) await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("uwu webhook disabled for you in this server.") + await ctx.send("UwU webhook disabled for you in this server.") else: data[str(ctx.author.id)] = True await self.config.guild(ctx.guild).user_uwu_toggle.set(data) - await ctx.send("uwu webhook enabled for you in this server.") + await ctx.send("UwU webhook enabled for you in this server.") @uwuuser.command(name="list") @checks.mod() async def uwuuser_list(self, ctx: commands.Context): - """List users with per-user uwu enabled or admin-forced.""" + """List users with per-user UwU enabled or admin-forced.""" data = await self.config.guild(ctx.guild).user_uwu_toggle() admin_override = await self.config.guild(ctx.guild).admin_override() if not data and not admin_override: - return await ctx.send("No users have per-user uwu enabled.") + return await ctx.send("No users have per-user UwU enabled.") lines = [] for uid in set(list(data.keys()) + list(admin_override.keys())): member = ctx.guild.get_member(int(uid)) @@ -149,13 +140,13 @@ async def uwuuser_list(self, ctx: commands.Context): @uwuuser.command(name="admin") @checks.mod() async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): - """Toggle admin-forced uwu for a user.""" + """Toggle admin-forced UwU for a user.""" admin_override = await self.config.guild(ctx.guild).admin_override() uid = str(member.id) if uid in admin_override: admin_override.pop(uid) await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced uwu disabled for {member.display_name}.") + await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") else: admin_override[uid] = True # Also remove user opt-in to prevent conflicts @@ -163,11 +154,11 @@ async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): user_toggle.pop(uid, None) await self.config.guild(ctx.guild).user_uwu_toggle.set(user_toggle) await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced uwu enabled for {member.display_name}.") + await ctx.send(f"Admin-forced UwU enabled for {member.display_name}.") @commands.command(aliases=["owo"]) async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: - """uwuize the replied to message, previous message, or your own text.""" + """Uwuize the replied to message, previous message, or your own text.""" if not text: if hasattr(ctx.message, "reference") and ctx.message.reference: with suppress( @@ -188,7 +179,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Event listener for auto-uwu channels + # Event listener for auto-UwU channels # @commands.Cog.listener() @@ -220,11 +211,11 @@ async def on_message(self, message: discord.Message): if not webhook: webhooks = await message.channel.webhooks() for wh in webhooks: - if wh.name == "uwu Bot": + if wh.name == "UwU Bot": webhook = wh break if not webhook: - webhook = await message.channel.create_webhook(name="uwu Bot") + webhook = await message.channel.create_webhook(name="UwU Bot") self._webhook_cache[message.channel.id] = webhook await webhook.send( @@ -239,7 +230,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """uwuize and return a string.""" + """Uwuize and return a string.""" converted = "" current_word = "" for letter in string: @@ -255,7 +246,7 @@ def uwuize_string(self, string: str) -> str: return converted def uwuize_word(self, word: str) -> str: - """uwuize and return a word.""" + """Uwuize and return a word.""" word = word.lower() uwu = word.rstrip(".?!,") punctuations = word[len(uwu) :] From 93e2be2ff53a075038aeb66ff7a58ecbe2254908 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 22:16:10 +0930 Subject: [PATCH 35/37] Credits --- uwu/uwu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index ec4abaab..0718cc6b 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + per-user toggle + admin overrides.""" +"""UwU cog for Red-DiscordBot by PhasecoreX + Didi (The channel and user toggles).""" # ruff: noqa: S311 import random From b7b9171d6014ad1fc5fc3c6dbca08e7bf57e19e1 Mon Sep 17 00:00:00 2001 From: DidiDidi129 <136057713+DidiDidi129@users.noreply.github.com> Date: Sun, 17 Aug 2025 22:18:33 +0930 Subject: [PATCH 36/37] uwu > UwU --- uwu/uwu.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index 0718cc6b..f3a7c885 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -1,4 +1,4 @@ -"""UwU cog for Red-DiscordBot by PhasecoreX + Didi (The channel and user toggles).""" +"""uwu cog for Red-DiscordBot by PhasecoreX + Didi (The channel and user toggles).""" # ruff: noqa: S311 import random @@ -12,7 +12,7 @@ class UwU(commands.Cog): - """UwU.""" + """uwu.""" __author__ = "PhasecoreX + Didi" __version__ = "2.5.0" @@ -55,7 +55,7 @@ def __init__(self, bot): self.config.register_global(uwu_channels={}) # Per-guild user toggles self.config.register_guild( - user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced UwU + user_uwu_toggle={}, admin_override={} # User opt-in # Admin-forced uwu ) self._webhook_cache: dict[int, discord.Webhook] = {} @@ -79,36 +79,36 @@ async def red_delete_data_for_user(self, *, _requester: str, _user_id: int) -> N @commands.group() @checks.is_owner() async def uwuset(self, ctx: commands.Context): - """Setup UwU channel settings.""" + """Setup uwu channel settings.""" @uwuset.command(name="channel") async def uwuset_channel(self, ctx: commands.Context, channel: discord.TextChannel): - """Enable UwU auto-messages for a channel.""" + """Enable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels[str(channel.id)] = True await self.config.uwu_channels.set(channels) - await ctx.send(f"UwU channel set: {channel.mention}") + await ctx.send(f"uwu channel set: {channel.mention}") @uwuset.command(name="remove") async def uwuset_remove(self, ctx: commands.Context, channel: discord.TextChannel): - """Disable UwU auto-messages for a channel.""" + """Disable uwu auto-messages for a channel.""" channels = await self.config.uwu_channels() channels.pop(str(channel.id), None) await self.config.uwu_channels.set(channels) self._webhook_cache.pop(channel.id, None) - await ctx.send(f"UwU channel removed: {channel.mention}") + await ctx.send(f"uwu channel removed: {channel.mention}") @commands.group() async def uwuuser(self, ctx: commands.Context): - """Toggle per-user UwU webhook in this server.""" + """Toggle per-user uwu webhook in this server.""" @uwuuser.command(name="toggle") async def uwuuser_toggle(self, ctx: commands.Context): - """Enable or disable UwU webhook for yourself in this server.""" + """Enable or disable uwu webhook for yourself in this server.""" admin_override = await self.config.guild(ctx.guild).admin_override() if str(ctx.author.id) in admin_override: return await ctx.send( - "Admin has forced UwU for you; you cannot disable it." + "Admin has forced uwu for you; you cannot disable it." ) data = await self.config.guild(ctx.guild).user_uwu_toggle() @@ -124,11 +124,11 @@ async def uwuuser_toggle(self, ctx: commands.Context): @uwuuser.command(name="list") @checks.mod() async def uwuuser_list(self, ctx: commands.Context): - """List users with per-user UwU enabled or admin-forced.""" + """List users with per-user uwu enabled or admin-forced.""" data = await self.config.guild(ctx.guild).user_uwu_toggle() admin_override = await self.config.guild(ctx.guild).admin_override() if not data and not admin_override: - return await ctx.send("No users have per-user UwU enabled.") + return await ctx.send("No users have per-user uwu enabled.") lines = [] for uid in set(list(data.keys()) + list(admin_override.keys())): member = ctx.guild.get_member(int(uid)) @@ -140,13 +140,13 @@ async def uwuuser_list(self, ctx: commands.Context): @uwuuser.command(name="admin") @checks.mod() async def uwuuser_admin(self, ctx: commands.Context, member: discord.Member): - """Toggle admin-forced UwU for a user.""" + """Toggle admin-forced uwu for a user.""" admin_override = await self.config.guild(ctx.guild).admin_override() uid = str(member.id) if uid in admin_override: admin_override.pop(uid) await self.config.guild(ctx.guild).admin_override.set(admin_override) - await ctx.send(f"Admin-forced UwU disabled for {member.display_name}.") + await ctx.send(f"Admin-forced uwu disabled for {member.display_name}.") else: admin_override[uid] = True # Also remove user opt-in to prevent conflicts @@ -179,7 +179,7 @@ async def uwu(self, ctx: commands.Context, *, text: str | None = None) -> None: ) # - # Event listener for auto-UwU channels + # Event listener for auto-uwu channels # @commands.Cog.listener() @@ -211,11 +211,11 @@ async def on_message(self, message: discord.Message): if not webhook: webhooks = await message.channel.webhooks() for wh in webhooks: - if wh.name == "UwU Bot": + if wh.name == "uwu Bot": webhook = wh break if not webhook: - webhook = await message.channel.create_webhook(name="UwU Bot") + webhook = await message.channel.create_webhook(name="uwu Bot") self._webhook_cache[message.channel.id] = webhook await webhook.send( @@ -230,7 +230,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """Uwuize and return a string.""" + """uwuize and return a string.""" converted = "" current_word = "" for letter in string: From 7162a06b2c76af0edf2f90ba2f00e378fbc06dfd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 17 Aug 2025 12:48:42 +0000 Subject: [PATCH 37/37] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- uwu/uwu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uwu/uwu.py b/uwu/uwu.py index f3a7c885..1de494ae 100644 --- a/uwu/uwu.py +++ b/uwu/uwu.py @@ -230,7 +230,7 @@ async def on_message(self, message: discord.Message): # def uwuize_string(self, string: str) -> str: - """uwuize and return a string.""" + """Uwuize and return a string.""" converted = "" current_word = "" for letter in string: