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)