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.*"
|
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,
|
author=bot.embed_author,
|
||||||
footer=discord.EmbedFooter(
|
footer=discord.EmbedFooter(
|
||||||
|
|||||||
@@ -154,6 +154,13 @@ class Users(base.Cog):
|
|||||||
@commands.command()
|
@commands.command()
|
||||||
@transactions.atomic()
|
@transactions.atomic()
|
||||||
async def mask(self, ctx: commands.Context, toggle: bool | None = None) -> None:
|
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)
|
user, _ = await utils.get_user(ctx.author)
|
||||||
|
|
||||||
channel_id = ctx.channel.id
|
channel_id = ctx.channel.id
|
||||||
@@ -222,7 +229,7 @@ class Users(base.Cog):
|
|||||||
|
|
||||||
message = (
|
message = (
|
||||||
"🕵️ From now on your profile will be "
|
"🕵️ 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
|
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 += f" You're currently being displayed as **{current_channel_ongoing_call_user_rs.mask_emoji} {current_channel_ongoing_call_user_rs.display_name}**."
|
||||||
|
|
||||||
message += (
|
message += (
|
||||||
@@ -238,13 +245,21 @@ class Users(base.Cog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
else:
|
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)
|
await ctx.send(message)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@transactions.atomic()
|
@transactions.atomic()
|
||||||
async def history(self, ctx: commands.Context) -> None:
|
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
|
user_id = ctx.author.id
|
||||||
|
|
||||||
call_rss = (
|
call_rss = (
|
||||||
@@ -389,7 +404,7 @@ class Users(base.Cog):
|
|||||||
@transactions.atomic()
|
@transactions.atomic()
|
||||||
async def me(self, ctx: commands.Context) -> None:
|
async def me(self, ctx: commands.Context) -> None:
|
||||||
"""
|
"""
|
||||||
Shows your statistics.
|
Shows your user statistics.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
user, profile = await utils.get_user(ctx.author)
|
user, profile = await utils.get_user(ctx.author)
|
||||||
@@ -456,7 +471,7 @@ class Users(base.Cog):
|
|||||||
else (
|
else (
|
||||||
"*Permanent.*"
|
"*Permanent.*"
|
||||||
if ban.expires_at is None
|
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,
|
inline=True,
|
||||||
|
|||||||
Reference in New Issue
Block a user