style(repo): ruff fixes
This commit is contained in:
parent
9df7f15bbe
commit
ea5f51892a
7 changed files with 39 additions and 38 deletions
|
@ -40,13 +40,13 @@ class Nerdify(commands.Cog):
|
|||
|
||||
@commands.command(aliases=["nerd"])
|
||||
async def nerdify(
|
||||
self, ctx: commands.Context, *, text: Optional[str] = None
|
||||
self, ctx: commands.Context, *, text: Optional[str] = None,
|
||||
) -> None:
|
||||
"""Nerdify 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
|
||||
discord.Forbidden, discord.NotFound, discord.HTTPException,
|
||||
):
|
||||
message_id = ctx.message.reference.message_id
|
||||
if message_id:
|
||||
|
@ -62,7 +62,7 @@ class Nerdify(commands.Cog):
|
|||
ctx.channel,
|
||||
self.nerdify_text(text),
|
||||
allowed_mentions=discord.AllowedMentions(
|
||||
everyone=False, users=False, roles=False
|
||||
everyone=False, users=False, roles=False,
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -77,7 +77,7 @@ class Nerdify(commands.Cog):
|
|||
return f'"{text}" 🤓'
|
||||
|
||||
async def type_message(
|
||||
self, destination: discord.abc.Messageable, content: str, **kwargs: Any
|
||||
self, destination: discord.abc.Messageable, content: str, **kwargs: Any,
|
||||
) -> Union[discord.Message, None]:
|
||||
"""Simulate typing and sending a message to a destination.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue