From 16ec131aefe616ed05b0a6cf6e5d618ba20e6aba Mon Sep 17 00:00:00 2001 From: KEriks Date: Tue, 10 Aug 2021 09:08:52 +0300 Subject: [PATCH] Fixes --- .gitignore | 2 ++ dbot/constants.py | 2 +- dbot/discord_bot.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 609530c..e1cf054 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ venv *.db +*.sqlite +*.sqlite3 *.log .env pid diff --git a/dbot/constants.py b/dbot/constants.py index 04e88ad..eda2f66 100644 --- a/dbot/constants.py +++ b/dbot/constants.py @@ -5,7 +5,7 @@ from erepublik.constants import COUNTRIES __all__ = ["events", COUNTRIES, "FLAGS", "UTF_FLAG"] -region = r"[\w\(\)\- ']+" +region = r"[\w\(\)\-& ']+" country = r"(Resistance force of )?[\w\(\)\- ]+" citizen = r"[\w\(\)\-\. \d]+" diff --git a/dbot/discord_bot.py b/dbot/discord_bot.py index d00299d..fa7073e 100644 --- a/dbot/discord_bot.py +++ b/dbot/discord_bot.py @@ -163,7 +163,7 @@ class MyClient(discord.Client): embed.set_footer(text=f"{entry_datetime.strftime('%F %T')} (eRepublik time)") logger.debug(f"Message sent: {text}") - await self.send_msg(DEFAULT_CHANNEL_ID, embed=embed) + await self.get_channel(DEFAULT_CHANNEL_ID).send(embed=embed) # await self.get_channel(DEFAULT_CHANNEL_ID).send(embed=embed) await asyncio.sleep((self.timestamp // 300 + 1) * 300 - self.timestamp)