Reduced & updated dependencies.

By default, messages larger than 2.000 characters (sent via tells) get sent via slaves, if these exist.
Fixes #3
This commit is contained in:
2021-10-18 19:39:14 +02:00
parent dea25b05a5
commit bb445e868d
20 changed files with 124 additions and 152 deletions
-35
View File
@@ -85,37 +85,6 @@ hh:mm - DD.MM.YYYY
f" [{self.text.make_chatcmd('orgs', '/tell <myname> orgs')}] " \
f"[{self.text.make_chatcmd('admins', '/tell <myname> admins')}]\n"
@event("connect", "prepare info msg")
def prepare_info(self, _, _1):
self.INFO = ChatBlob("Welcome", f"<font color=CCInfoText>You're getting this message,\n"
f"because you recently joined the clan alliance\n"
f"<highlight>The New Alliance</highlight> or in short "
f"<highlight>TNA</highlight>.\n"
f"I'm <notice><myname></notice>, a bot with the task to "
f"automate a few workflows around here,\n"
f"while making the life of everyone a bit easier.\n"
f"\n"
f"You can see a list of all my orgs by using "
f"{self.text.make_tellcmd('!orgs', 'orgs')}.\n"
f"Whenever you use {self.text.make_tellcmd('!online', 'online')} "
f"I'll show you who's currently around.\n"
f"We've got regular raids, you can view them by using "
f"{self.text.make_tellcmd('!raids', 'raids')}\n"
f"If you'd like to stay out, thats fine. Just turn all settings off here: "
f"{self.text.make_tellcmd('here', 'prefs')}\n"
f"\n"
f"If you encounter any issues, my administrators will help you. just ask them, "
f"you can find them all here: {self.text.make_tellcmd('!admins', 'admins')}\n"
f"\n"
f"<highlight>Thats it already. "
f"Thank you for taking your time to read this note. See you ingame!</highlight>"
f"</font>")
self.INFO = f"\n<yellow>________________\n\n" \
f" No need to <red>PANIC</red>!\n" \
f" [{self.text.paginate_single(self.INFO)}]\n" \
f" to our alliance!\n" \
f"________________</yellow>"
@event(event_type="member_logon", description="Send news to players logging in")
def logon_event(self, _, data):
if not self.bot.is_ready():
@@ -140,10 +109,6 @@ hh:mm - DD.MM.YYYY
discord,
self.preferences.get_pref_view_small(account))
# This one is kinda redudant now that the simple checks get done above, will remove it in the future.
if account.last_seen == 0 and self.setting_service.get_value('is_alliance_bot') == "1":
self.bot.send_mass_message(data.packet.char_id, self.INFO)
@command(command="raids", params=[], description="Show the Raids", access_level="member")
def show_raids(self, _):
with open("data/latest_raids.txt", "r") as f: