From: Georgios Atheridis Date: Sat, 13 Aug 2022 23:38:09 +0000 (+0000) Subject: fixed joke to remove new lines X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=13dd98dd47346536db433b15bfb3e037bdb939f7;p=ihaspeks%2Faptbot-ihaspeks.git fixed joke to remove new lines --- diff --git a/skgyorugo/auto_messages/jokes.py b/skgyorugo/auto_messages/jokes.py index ee98a47..bbb4eb8 100644 --- a/skgyorugo/auto_messages/jokes.py +++ b/skgyorugo/auto_messages/jokes.py @@ -20,6 +20,7 @@ def main(bot: Bot, message: Message): return data = json.loads(r.data.decode("utf-8")) + joke = data["joke"].replace("\r\n", " ") tools.smart_privmsg.send( - bot, message, f"{data['joke']} ||| Get more jokes by typing ?joke" + bot, message, f"{joke} ||| Get more jokes by typing ?joke" ) diff --git a/skgyorugo/commands/Q.py b/skgyorugo/commands/Q.py index b694929..89e8ee6 100644 --- a/skgyorugo/commands/Q.py +++ b/skgyorugo/commands/Q.py @@ -19,7 +19,7 @@ PATH = os.path.join(PATH, "..") def main(bot: Bot, message: Message): - if random.random() < 0.09: + if random.random() < 0.02: q = [ "https://imgur.com/d5qGioI", "https://imgur.com/oaMmxXI", @@ -98,9 +98,9 @@ def main(bot: Bot, message: Message): wait_list.append(user.display_name) if prio_queue: - msg = f"These people are playing with {message.channel}: {play_list} | These people are in Priority Queue: {prio_queue} | These people are in the Wait List: {wait_list}" + msg = f"These people are playing with {message.channel}: {play_list} | These people are in Priority Queue: {prio_queue} | These people are in the Wait List: {wait_list}." else: - msg = f"These people are playing with {message.channel}: {play_list} | These people are in the Wait List: {wait_list}" + msg = f"These people are playing with {message.channel}: {play_list} | These people are in the Wait List: {wait_list}." tools.smart_privmsg.send( bot, message, diff --git a/skgyorugo/main.py b/skgyorugo/main.py index 1d1b327..30ee0c0 100644 --- a/skgyorugo/main.py +++ b/skgyorugo/main.py @@ -113,7 +113,7 @@ def start(bot: Bot, message: Message, stop_event: Event): started = tools.smart_start_stream_time.update_start_stream_timestamp() if started == "START": bot.send_privmsg( - message.channel, "Stream has started, you can now use ?join" + message.channel, "/announce Stream has started, you can now use ?join" ) elif started == "END": bot.send_privmsg(message.channel, "Stream has ended")