fix(bot): 🐛 p.fr command.

This commit is contained in:
Nyeki.py
2024-10-17 14:31:36 -03:00
parent c377c9c175
commit cd52adf61f
+3 -4
View File
@@ -76,8 +76,7 @@ class Calls(base.Cog):
@hangup_calls.before_loop @hangup_calls.before_loop
async def before_hangup_calls(self): async def before_hangup_calls(self):
"""Wait until the bot is ready to start looping. """Wait until the bot is ready to start looping."""
"""
await self.bot.wait_until_ready() await self.bot.wait_until_ready()
await asyncio.wait(5) await asyncio.wait(5)
@@ -597,7 +596,7 @@ class Calls(base.Cog):
channel_id = ctx.channel.id channel_id = ctx.channel.id
call = await models.Call.get(channels__id=channel_id).prefetch_related( call = await models.Call.get(channels__id=channel_id).prefetch_related(
"channels", "call_rss" "channels", "call_rss", "call_rss__profile"
) )
other_channel = find(lambda c: c.id != channel_id, call.channels) other_channel = find(lambda c: c.id != channel_id, call.channels)
@@ -607,7 +606,7 @@ class Calls(base.Cog):
try: try:
await self.bot.get_partial_messageable(other_channel.id).send( await self.bot.get_partial_messageable(other_channel.id).send(
f"**{call_rs.mask_emoji + " " if call_rs.is_masked else None} {call_rs.display_name}** (`{ctx.author.name}`) wants you to add them as a friend on Discord." f"**{call_rs.mask_emoji + " " if call_rs.is_masked else ""}{call_rs.display_name}** (`{ctx.author.name}`) wants you to add them as a friend on Discord."
) )
except errors.DiscordException: except errors.DiscordException: