fix(bot): 🐛 p.mask showing a wrong message.
This commit is contained in:
@@ -34,14 +34,6 @@ class BanNotificationEmbed(discord.Embed):
|
||||
else "*Does not expire.*"
|
||||
),
|
||||
),
|
||||
discord.EmbedField(
|
||||
name="Appeal",
|
||||
value=(
|
||||
"*You haven't appealed this ban.*"
|
||||
if ban.appeal is None
|
||||
else ban.appeal
|
||||
),
|
||||
),
|
||||
],
|
||||
author=bot.embed_author,
|
||||
footer=discord.EmbedFooter(
|
||||
|
||||
@@ -154,6 +154,13 @@ class Users(base.Cog):
|
||||
@commands.command()
|
||||
@transactions.atomic()
|
||||
async def mask(self, ctx: commands.Context, toggle: bool | None = None) -> None:
|
||||
"""
|
||||
Hide your identity during calls with a mask.
|
||||
|
||||
Options:
|
||||
- `[<toggle>]`: On or off. If not set, your current status and mask will be displayed.
|
||||
"""
|
||||
|
||||
user, _ = await utils.get_user(ctx.author)
|
||||
|
||||
channel_id = ctx.channel.id
|
||||
@@ -222,7 +229,7 @@ class Users(base.Cog):
|
||||
|
||||
message = (
|
||||
"🕵️ From now on your profile will be "
|
||||
+ ("hidden" if user.is_masked else "displayed")
|
||||
+ ("hidden" if toggle else "displayed")
|
||||
+ "."
|
||||
)
|
||||
|
||||
@@ -230,7 +237,7 @@ class Users(base.Cog):
|
||||
lambda rs: rs.channel_id == channel_id, ongoing_call_user_rss
|
||||
)
|
||||
|
||||
if current_channel_ongoing_call_user_rs and user.is_masked:
|
||||
if current_channel_ongoing_call_user_rs and toggle:
|
||||
message += f" You're currently being displayed as **{current_channel_ongoing_call_user_rs.mask_emoji} {current_channel_ongoing_call_user_rs.display_name}**."
|
||||
|
||||
message += (
|
||||
@@ -238,13 +245,21 @@ class Users(base.Cog):
|
||||
)
|
||||
|
||||
else:
|
||||
message += f" Use `{ctx.clean_prefix}mask pff` to turn it off."
|
||||
if toggle:
|
||||
message += f" Use `{ctx.clean_prefix}mask on` to turn it on."
|
||||
|
||||
else:
|
||||
message += f" Use `{ctx.clean_prefix}mask off` to turn it off."
|
||||
|
||||
await ctx.send(message)
|
||||
|
||||
@commands.command()
|
||||
@transactions.atomic()
|
||||
async def history(self, ctx: commands.Context) -> None:
|
||||
"""
|
||||
See your calls history. Links will take you to the beginning of the call.
|
||||
"""
|
||||
|
||||
user_id = ctx.author.id
|
||||
|
||||
call_rss = (
|
||||
@@ -389,7 +404,7 @@ class Users(base.Cog):
|
||||
@transactions.atomic()
|
||||
async def me(self, ctx: commands.Context) -> None:
|
||||
"""
|
||||
Shows your statistics.
|
||||
Shows your user statistics.
|
||||
"""
|
||||
|
||||
user, profile = await utils.get_user(ctx.author)
|
||||
@@ -456,7 +471,7 @@ class Users(base.Cog):
|
||||
else (
|
||||
"*Permanent.*"
|
||||
if ban.expires_at is None
|
||||
else f"<t:{int(ban.expires_at.timestamp())}:F> (<t:{int(ban.expires_at.timestamp())}:R>)"
|
||||
else f"Until <t:{int(ban.expires_at.timestamp())}:F> (<t:{int(ban.expires_at.timestamp())}:R>)"
|
||||
)
|
||||
),
|
||||
inline=True,
|
||||
|
||||
Reference in New Issue
Block a user