Skip to content

Commit 4ef4ffc

Browse files
Improve error messages
1 parent 0a46604 commit 4ef4ffc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cogs/stats/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def channel_stats(
9191
)
9292
return
9393

94-
stats_channel: discord.TextChannel | None
94+
stats_channel: discord.TextChannel | None = None
9595

9696
if not str_channel_id:
9797
if not isinstance(ctx.channel, discord.TextChannel):
@@ -192,7 +192,7 @@ async def server_stats(self, ctx: "TeXBotApplicationContext") -> None:
192192
await self.command_send_error(
193193
ctx,
194194
message=(
195-
"Interaction channel was None while attempting to send left member stats."
195+
"Interaction channel was None while attempting to send server stats."
196196
),
197197
)
198198
return
@@ -203,7 +203,7 @@ async def server_stats(self, ctx: "TeXBotApplicationContext") -> None:
203203
await self.command_send_error(
204204
ctx,
205205
message=(
206-
"Left member stats cannot be sent in a voice, forum, or category channel."
206+
"Server stats cannot be sent in a voice, forum, or category channel."
207207
),
208208
)
209209
return
@@ -303,7 +303,7 @@ async def user_stats(self, ctx: "TeXBotApplicationContext") -> None:
303303
await self.command_send_error(
304304
ctx,
305305
message=(
306-
"Interaction channel was None while attempting to send left member stats."
306+
"Interaction channel was None while attempting to send user stats."
307307
),
308308
)
309309
return
@@ -314,7 +314,7 @@ async def user_stats(self, ctx: "TeXBotApplicationContext") -> None:
314314
await self.command_send_error(
315315
ctx,
316316
message=(
317-
"Left member stats cannot be sent in a voice, forum, or category channel."
317+
"User stats cannot be sent in a voice, forum, or category channel."
318318
),
319319
)
320320
return

0 commit comments

Comments
 (0)