Skip to content

Commit

Permalink
no message needed channel not joined when in user's chat
Browse files Browse the repository at this point in the history
  • Loading branch information
Ereiarrus committed Feb 5, 2024
1 parent 937b858 commit 214a166
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/complements_bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import itertools
import os
import random
import sys
import textwrap
from typing import Awaitable, Callable, Iterable, Optional, Tuple, Union

Expand Down Expand Up @@ -55,7 +56,7 @@ def custom_log(msg: str, should_log: bool = True) -> None:
Any messages which we want to log should be passed through this method
"""
if should_log:
print(msg)
print(msg, file=sys.stderr)


class ComplementsBot(commands.Bot):
Expand Down Expand Up @@ -1205,7 +1206,7 @@ async def do_true(ctx: commands.Context) -> None:
ComplementsBot.DoIfElse(
(lambda _: database.is_channel_joined(userid=userid)),
f"@{ComplementsBot.F_USER} I have left your channel.",
f"@{ComplementsBot.F_USER} I have not joined your channel.",
None,
do_true,
None
)
Expand Down

0 comments on commit 214a166

Please sign in to comment.