rewrite: New Video channels and moderation.

This commit is contained in:
2023-08-15 14:03:23 +03:00
parent 7e6217a2ae
commit 2cc90375c7
21 changed files with 2227 additions and 11 deletions

View File

@@ -72,7 +72,7 @@ class TaskMonitor(Generic[Taskid]):
wake = self._taskmap[nextid] >= timestamp
wake = wake or taskid == nextid
else:
wake = False
wake = True
if taskid in self._taskmap:
self._tasklist.remove(taskid)
self._taskmap[taskid] = timestamp

View File

@@ -281,6 +281,8 @@ class DashboardSection:
setting_classes = []
configui = None
_option_name = None
def __init__(self, bot: LionBot, guildid: int):
self.bot = bot
self.guildid = guildid
@@ -289,6 +291,16 @@ class DashboardSection:
# Populated in load()
self.instances = []
@property
def option_name(self) -> str:
t = self.bot.translator.t
string = self._option_name or self.section_name
return t(string).format(
bot=self.bot,
commands=self.bot.core.mention_cache
)
async def load(self):
"""
Initialise the contained settings.