Skip to content

Commit 52ea926

Browse files
committed
fix(emotes) Edit changed emotes
1 parent baf9a36 commit 52ea926

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/modules/personal/emotes.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,24 @@ async def component_teardown(self) -> None:
3535
self.check_emotes.cancel()
3636
await super().component_teardown()
3737

38-
async def send_error_embed(self, emote: str, service: str, colour: int) -> None:
38+
async def send_error_embed(self, emotes_to_send: list[str], service: str, colour: int) -> None:
3939
"""Helper function to send a ping to Aluerie that something is wrong with emote services."""
4040
content = self.bot.error_ping
4141
embed = Embed(
4242
title=f"Problem with {service} emotes",
43-
description=f"Looks like emote `{emote}` is no longer present in the channel.",
43+
description=(
44+
"Looks like the following emote(-s) are no longer present in the channel.\n"
45+
f"```\n{', '.join(emotes_to_send)}```"
46+
),
4447
colour=colour,
45-
).set_footer(text="but it was previously used for @IreBot emotes")
48+
).set_footer(text="but it was previously used for @IrenesBot emotes")
4649
await self.bot.error_webhook.send(content=content, embed=embed)
4750

4851
async def cross_check_emotes(self, api_emotes: list[str], bot_emotes: type[StrEnum], colour: int) -> None:
4952
"""Cross check between emote list in `utils.const` and list from 3rd party emote service API."""
50-
for emote in bot_emotes:
51-
if emote not in api_emotes:
52-
await self.send_error_embed(emote, bot_emotes.__name__, colour)
53+
emotes_to_send: list[str] = [e for e in bot_emotes if e not in api_emotes]
54+
if emotes_to_send:
55+
await self.send_error_embed(emotes_to_send, bot_emotes.__name__, colour)
5356

5457
@ireloop(time=[datetime.time(hour=5, minute=59)])
5558
async def check_emotes(self) -> None:

src/modules/personal/stable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ async def controller(self, ctx: IreContext) -> None:
121121
@commands.command()
122122
async def discord(self, ctx: IreContext) -> None:
123123
"""Link to my discord community server."""
124-
await ctx.send(f"{const.STV.Discord} discord.gg/K8FuDeP")
124+
await ctx.send(f"{const.STV.discord} discord.gg/K8FuDeP")
125125

126126
@commands.command()
127127
async def donate(self, ctx: IreContext) -> None:

src/utils/const.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class STV(StrEnum):
8787
DankReading = "DankReading"
8888
DankThink = "DankThink"
8989
Deadge = "Deadge"
90-
Discord = "Discord"
90+
discord = "discord"
9191
donkDetective = "donkDetective"
9292
donkHappy = "donkHappy"
9393
donkHey = "donkHey"
@@ -101,7 +101,6 @@ class STV(StrEnum):
101101
FeelsBingMan = "FeelsBingMan"
102102
FirstTimeChadder = "FirstTimeChadder"
103103
FirstTimeDentge = "FirstTimeDentge"
104-
FirstTimePlinker = "FirstTimePlinker"
105104
forsenCD = "forsenCD"
106105
gg = "gg"
107106
GroupScoots = "GroupScoots"

0 commit comments

Comments
 (0)