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:
@@ -36,8 +36,7 @@ class AccountController:
|
||||
@command(command="account", params=[], access_level="member",
|
||||
description="View your account")
|
||||
def account(self, request: command_request):
|
||||
out = self.show_account(request.sender.char_id)
|
||||
self.bot.send_mass_message(request.sender.char_id, out)
|
||||
return self.show_account(request.sender.char_id)
|
||||
|
||||
@command(command="accounts", params=[Const('online', is_optional=True)], access_level="moderator",
|
||||
description="View all accounts")
|
||||
@@ -238,6 +237,10 @@ class AccountController:
|
||||
if not mod:
|
||||
response += f" Options: {prefs}\n"
|
||||
response += f" Points: <notice>{alts[0].points}</notice>\n"
|
||||
last_seen = {}
|
||||
for x in alts:
|
||||
if x.last_seen > last_seen.get("last_seen", 0):
|
||||
last_seen = x
|
||||
access_levels = {f"Member ({alts[0].member})": self.account_service.check_member(alts[0].char_id),
|
||||
"Officer": self.account_service.check_officer(alts[0].char_id),
|
||||
"General": self.account_service.check_general(alts[0].char_id),
|
||||
@@ -252,12 +255,13 @@ class AccountController:
|
||||
perms.append(key)
|
||||
response += f" Status: {'<green>Open</green>' if alts[0].disabled == 0 else '<red>Closed</red>'}\n"
|
||||
response += f" Created at: <notice>{self.util.format_datetime(alts[0].created)}</notice>\n"
|
||||
response += f" Last seen on <notice>{last_seen.name}</notice> <highlight>{self.util.time_to_readable(time.time()-last_seen.last_seen)}</highlight> ago\n"
|
||||
response += f" Permissions: <notice>{', '.join(perms)}</notice>\n"
|
||||
if alts[0].discord_joined == 1:
|
||||
joined = '(Joined server)'
|
||||
joined = ' (Joined server)'
|
||||
else:
|
||||
joined = '(Left server)' if alts[0].discord_invite != '' else 'Never joined'
|
||||
response += f" Discord: <notice>{alts[0].discord_handle}</notice> {joined}\n\n"
|
||||
joined = ' (Left server)' if alts[0].discord_invite != '' else 'Never joined'
|
||||
response += f" Discord: <notice>{alts[0].discord_handle}</notice>{joined}\n\n"
|
||||
log_types = ['Points', 'Loot', 'Raid', 'Public', 'Admin', 'System']
|
||||
response += " Logs: ["
|
||||
for i in log_types:
|
||||
|
||||
Reference in New Issue
Block a user