diff --git a/bot_s3rius/actions/converters/currency.py b/bot_s3rius/actions/converters/currency.py index 7d1fa48c35cd9df49c446c145cb452fac771317d..da1951b9e36616c0ad551dde4a4d625ac74b7f15 100644 --- a/bot_s3rius/actions/converters/currency.py +++ b/bot_s3rius/actions/converters/currency.py @@ -61,8 +61,8 @@ SUPPORTED_CURRENCIES = [ MEMES = { (40, "UAH"): "штанi", - (300, "USD"): "один fisting", - (20, "USD"): "blowjob", + (300, "USD"): "один поход в Dungeon", + (20, "USD"): "boy next door", } CURRENCY_PATTERN = ( @@ -80,6 +80,8 @@ CURRENCY_PATTERN = ( async def replace_currency(event): async with httpx.AsyncClient() as f: current_currency = await f.get("https://www.cbr-xml-daily.ru/daily_json.js") + chat = await event.get_chat() + memes_allowed = str(chat.id) not in set(config.excluded_chats) response_json = current_currency.json() currencies = response_json["Valute"] groups = re.findall(CURRENCY_PATTERN, event.message.message, re.IGNORECASE) @@ -95,7 +97,7 @@ async def replace_currency(event): / Decimal(currencies[c_info.name]["Nominal"]) ) meme = "" - if meme_extra: + if meme_extra and memes_allowed: meme = f"{meme_extra} или " if val_id not in currency_mapper: