Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cogs/make_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from db.core.models import GroupMadeMember
from exceptions import ApplicantRoleDoesNotExistError, GuestRoleDoesNotExistError
from utils import CommandChecks, TeXBotBaseCog
from utils.msl import fetch_community_group_members_count, is_id_a_community_group_member
from utils.msl import (
fetch_community_group_members_count,
is_id_a_community_group_member,
)

if TYPE_CHECKING:
from collections.abc import Sequence
Expand Down
10 changes: 10 additions & 0 deletions cogs/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
GuestRoleDoesNotExistError,
GuildDoesNotExistError,
MemberRoleDoesNotExistError,
MSLMembershipError,
RolesChannelDoesNotExistError,
)
from utils import TeXBotBaseCog
from utils.msl import fetch_community_group_members_list

if TYPE_CHECKING:
from collections.abc import Sequence
Expand Down Expand Up @@ -109,6 +111,14 @@ async def on_ready(self) -> None:
if not discord.utils.get(main_guild.text_channels, name="general"):
logger.warning(GeneralChannelDoesNotExistError())

try:
await fetch_community_group_members_list()
except MSLMembershipError as msl_membership_error:
logger.debug(
Comment thread
MattyTheHacker marked this conversation as resolved.
"Failed to update community group member list cache on startup: %s",
msl_membership_error,
)
Comment thread
MattyTheHacker marked this conversation as resolved.

if settings["STRIKE_PERFORMED_MANUALLY_WARNING_LOCATION"] != "DM":
manual_moderation_warning_message_location_exists: bool = bool(
discord.utils.get(
Expand Down
Loading