2 Commits

Author SHA1 Message Date
AlberLC
c9a46b2b07 Fix roles mentions in weather 2022-06-01 03:16:45 +02:00
AlberLC
92ee0e405d Fix env variable names 2022-05-31 23:08:36 +02:00
3 changed files with 5 additions and 4 deletions

View File

@@ -568,8 +568,9 @@ class FlanaBot(MultiBot, ABC):
possible_mentioned_ids.append(user.name.split('#')[0].lower()) possible_mentioned_ids.append(user.name.split('#')[0].lower())
possible_mentioned_ids.append(f'@{user.id}') possible_mentioned_ids.append(f'@{user.id}')
for role in await self.get_group_roles(message): if roles := await self.get_group_roles(message):
possible_mentioned_ids.append(f'@{role.id}') for role in roles:
possible_mentioned_ids.append(f'@{role.id}')
original_text_words = flanautils.remove_accents(message.text.lower()) original_text_words = flanautils.remove_accents(message.text.lower())
original_text_words = original_text_words.replace(',', ' ').replace(';', ' ').replace('-', ' -') original_text_words = original_text_words.replace(',', ' ').replace(';', ' ').replace('-', ' -')

View File

@@ -29,7 +29,7 @@ HOT_CHANNEL_ID = 493530483045564417
# ---------------------------------------------------------------------------------------------------- # # ---------------------------------------------------------------------------------------------------- #
class FlanaDiscBot(DiscordBot, FlanaBot): class FlanaDiscBot(DiscordBot, FlanaBot):
def __init__(self): def __init__(self):
super().__init__(os.environ['DISCORD_BOT_TOKEN2']) super().__init__(os.environ['DISCORD_BOT_TOKEN'])
self.heating = False self.heating = False
self.heat_level = 0 self.heat_level = 0

View File

@@ -36,7 +36,7 @@ class FlanaTeleBot(TelegramBot, FlanaBot):
super().__init__( super().__init__(
api_id=os.environ['TELEGRAM_API_ID'], api_id=os.environ['TELEGRAM_API_ID'],
api_hash=os.environ['TELEGRAM_API_HASH'], api_hash=os.environ['TELEGRAM_API_HASH'],
bot_session=os.environ['TELEGRAM_BOT_SESSION2'], bot_session=os.environ['TELEGRAM_BOT_SESSION'],
user_session=os.environ['TELEGRAM_USER_SESSION'] user_session=os.environ['TELEGRAM_USER_SESSION']
) )
self.whitelist_ids = [] self.whitelist_ids = []