From 910913b615fa39bf8cb4eaca0718f517af5c7c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Efehan=20At=C4=B1c=C4=B1?= Date: Tue, 21 Sep 2021 19:40:52 +0300 Subject: [PATCH] Fix/sub issue (#35) * Update is_subscriber condition to == '0' * My dumbass forgot how conditions work * Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++-- src/bots/twitch_bot.py | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8faac42..f71d28f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - There are no unreleased changes. +## [1.4.4] - 2021-08-13 +### Fixed +- \[SUB\] Notation appearing in messages even though the user is not subbed to channel. + ## [1.4.3] - 2021-08-13 ### Fixed - Bot now joins the owner's channel if started from scratch @@ -86,8 +90,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Unit tests to some twitch bot methods. - Changelog -[Unreleased]: https://github.com/aticie/ronnia/compare/v1.4.3...HEAD -[1.4.3]: https://github.com/aticie/ronnia/compare/v1.4.2...1.4.3 +[Unreleased]: https://github.com/aticie/ronnia/compare/v1.4.4...HEAD +[1.4.4]: https://github.com/aticie/ronnia/compare/v1.4.3...v1.4.4 +[1.4.3]: https://github.com/aticie/ronnia/compare/v1.4.2...v1.4.3 [1.4.2]: https://github.com/aticie/ronnia/compare/v1.4.1...v1.4.2 [1.4.1]: https://github.com/aticie/ronnia/compare/v1.4.0...v1.4.1 [1.4.0]: https://github.com/aticie/ronnia/compare/v1.3.5...v1.4.0 diff --git a/src/bots/twitch_bot.py b/src/bots/twitch_bot.py index 4c8d148..bc7d446 100644 --- a/src/bots/twitch_bot.py +++ b/src/bots/twitch_bot.py @@ -336,7 +336,8 @@ async def _prepare_irc_message(self, message: Message, beatmap_info: dict, given extra_prefix = "" if message.author.is_mod: extra_prefix += "[MOD] " - elif message.author.is_subscriber: + elif message.author.is_subscriber != '0': + # TODO: Check if this conditional changed in the next releases of tio extra_prefix += "[SUB] " elif 'vip' in message.author._badges: extra_prefix += "[VIP] "