diff --git a/CHANGELOG.md b/CHANGELOG.md index 36158ab..3fd6e79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,7 +107,7 @@ every time * `/prepembed` now allows for exporting/import embeds. * Direct message logs are now more cleanly formatted and use relative dates. * Users are now sent a direct message about why their message was deleted after editing it to include a censored term. -* Staff can now change a user's nickname or kick the user from a innapropriate username report. +* Staff can now change a user's nickname or kick the user from a inappropriate username report. * Edited message logs now include a link to jump to a message. * Deleted message logs of non-cached messages now contain an explanation for why more data is not available in the log. * Censor cog for handling all message censoring. diff --git a/src/discord/censor.py b/src/discord/censor.py index 47aad9e..91222d9 100644 --- a/src/discord/censor.py +++ b/src/discord/censor.py @@ -30,7 +30,7 @@ class Censor(commands.Cog): """ - Responsible for censoring innapropriate words' and emojis in user content. + Responsible for censoring inappropriate words' and emojis in user content. """ def __init__(self, bot: PiBot): @@ -223,7 +223,7 @@ async def on_message_edit(self, before: discord.Message, after: discord.Message) await after.author.send( "You recently edited a message, but it **contained a censored " "word**! Therefore, I unfortunately had to delete it. In the " - "future, please do not edit innapropriate words into your " + "future, please do not edit inappropriate words into your " "messages, and they will not be deleted.", ) @@ -240,7 +240,7 @@ async def on_message_edit(self, before: discord.Message, after: discord.Message) @commands.Cog.listener() async def on_member_join(self, member: discord.Member): - # Check to see if user's name is innapropriate + # Check to see if user's name is inappropriate name = member.name if await self.censor_needed(name): # If name contains a censored link @@ -252,13 +252,13 @@ async def on_member_join(self, member: discord.Member): async def on_member_update(self, _, after): """ When a member updates their presence on the Discord server, check to see - if their name contains an innapropriate term, and if so, open a report. + if their name contains an inappropriate term, and if so, open a report. Args: after (discord.Member): The member who changed their name, after they've changed it. """ - # Notify staff if the user updated their name to include an innapropriate name + # Notify staff if the user updated their name to include an inappropriate name if after.nick is None: return # No need to check if user does not have a new nickname set diff --git a/src/discord/reporter.py b/src/discord/reporter.py index 9dbdb61..6b941c8 100644 --- a/src/discord/reporter.py +++ b/src/discord/reporter.py @@ -28,9 +28,9 @@ class IgnoreButton(discord.ui.Button): the report database to be updated. """ - report_view: InnapropriateUsername | InvitationalRequest + report_view: InappropriateUsername | InvitationalRequest - def __init__(self, view: InnapropriateUsername | InvitationalRequest): + def __init__(self, view: InappropriateUsername | InvitationalRequest): self.report_view = view super().__init__( style=discord.ButtonStyle.gray, @@ -47,7 +47,7 @@ async def callback(self, interaction: discord.Interaction): interaction.guild.text_channels, name="closed-reports", ) - if isinstance(self.report_view, InnapropriateUsername): + if isinstance(self.report_view, InappropriateUsername): await closed_reports.send( f"**Report was ignored** by {interaction.user.mention} - {self.report_view.member.mention} had the " f"inappropriate username `{self.report_view.offending_username}`, but the report was ignored. ", @@ -67,9 +67,9 @@ class CompletedButton(discord.ui.Button): A button to mark a report as completed. """ - report_view: InnapropriateUsername | InvitationalRequest + report_view: InappropriateUsername | InvitationalRequest - def __init__(self, view: InnapropriateUsername | InvitationalRequest): + def __init__(self, view: InappropriateUsername | InvitationalRequest): self.report_view = view super().__init__( style=discord.ButtonStyle.green, @@ -101,9 +101,9 @@ class ChangeInappropriateUsername(discord.ui.Button): and the report database to be updated. """ - report_view: InnapropriateUsername + report_view: InappropriateUsername - def __init__(self, view: InnapropriateUsername): + def __init__(self, view: InappropriateUsername): self.report_view = view super().__init__( style=discord.ButtonStyle.green, @@ -127,7 +127,7 @@ async def callback(self, interaction: discord.Interaction): ) if member_still_here: await closed_reports.send( - f"**Member's username was changed** by {interaction.user.mention} - {self.report_view.member.mention} had the innapropriate username `{self.report_view.offending_username}`, and their username was changed to `boomilever`.", + f"**Member's username was changed** by {interaction.user.mention} - {self.report_view.member.mention} had the inappropriate username `{self.report_view.offending_username}`, and their username was changed to `boomilever`.", ) # Change the user's username @@ -135,7 +135,7 @@ async def callback(self, interaction: discord.Interaction): else: await closed_reports.send( - f"**Member's username was attempted to be changed** by {interaction.user.mention} - {self.report_view.member.mention} had the innapropriate username `{self.report_view.offending_username}`, and their username was attempted to be changed to `boomilever`, however, the user had left the server.", + f"**Member's username was attempted to be changed** by {interaction.user.mention} - {self.report_view.member.mention} had the inappropriate username `{self.report_view.offending_username}`, and their username was attempted to be changed to `boomilever`, however, the user had left the server.", ) # Update the report database @@ -147,9 +147,9 @@ class KickUserButton(discord.ui.Button): Discord button which allows a staff member to promptly kick a user. """ - report_view: InnapropriateUsername + report_view: InappropriateUsername - def __init__(self, view: InnapropriateUsername): + def __init__(self, view: InappropriateUsername): self.report_view = view super().__init__( style=discord.ButtonStyle.red, @@ -173,7 +173,7 @@ async def callback(self, interaction: discord.Interaction): ) if member_still_here: await closed_reports.send( - f"**Member was kicked** by {interaction.user.mention} - {self.report_view.member.mention} had the innapropriate username `{self.report_view.offending_username}`, and the user was kicked from the server.", + f"**Member was kicked** by {interaction.user.mention} - {self.report_view.member.mention} had the inappropriate username `{self.report_view.offending_username}`, and the user was kicked from the server.", ) # Kick the user @@ -181,7 +181,7 @@ async def callback(self, interaction: discord.Interaction): else: await closed_reports.send( - f"**Attempted to kick member* by {interaction.user.mention} - {self.report_view.member.mention} had the innapropriate username `{self.report_view.offending_username}` and a kick was attempted on the user, however, the user had left the server.", + f"**Attempted to kick member* by {interaction.user.mention} - {self.report_view.member.mention} had the inappropriate username `{self.report_view.offending_username}` and a kick was attempted on the user, however, the user had left the server.", ) # Update the report database @@ -265,9 +265,9 @@ async def callback(self, interaction: discord.Interaction): await update_invitational_list(self.report_view.bot) -class InnapropriateUsername(discord.ui.View): +class InappropriateUsername(discord.ui.View): """ - Discord view representing a report on a user with an innapropriate username. + Discord view representing a report on a user with an inappropriate username. """ member: discord.Member @@ -367,7 +367,7 @@ async def create_inappropriate_username_report( offending_username: str, ): """ - Creates a report that a user has an innapropriate username. + Creates a report that a user has an inappropriate username. Args: member: The member with the inappropriate username. @@ -396,7 +396,7 @@ async def create_inappropriate_username_report( ) await reports_channel.send( embed=embed, - view=InnapropriateUsername(member, 123, offending_username), + view=InappropriateUsername(member, 123, offending_username), ) async def create_cron_task_report(self, task: dict) -> None: