Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ GROUP_SHORT_NAME=[Replace with the short colloquial name of your community group

# The URL of the page where guests can purchase a full membership to join your community group
# Must be a valid URL
PURCHASE_MEMBERSHIP_URL=[Replace with your group\'s purchase=membership URL]
PURCHASE_MEMBERSHIP_URL=[Replace with your group\'s purchase-membership URL]

# The URL of the page containing information about the perks of buying a full membership to join your community group
# Must be a valid URL
MEMBERSHIP_PERKS_URL=[Replace with your group\'s membership-perks URL]

# The invite link URL to allow users to join your community group's Discord server
# Must be a valid URL
Expand Down
4 changes: 2 additions & 2 deletions cogs/make_applicant.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def _perform_make_applicant(


class MakeApplicantSlashCommandCog(BaseMakeApplicantCog):
"""Cog class that defines the "/make_applicant" slash-command."""
"""Cog class that defines the "/make-applicant" slash-command."""

@staticmethod
async def autocomplete_get_members(
Expand Down Expand Up @@ -195,7 +195,7 @@ async def make_applicant( # type: ignore[misc]


class MakeApplicantContextCommandsCog(BaseMakeApplicantCog):
"""Cog class that defines the "/make_applicant" context commands."""
"""Cog class that defines the context menu make-applicant commands."""

@discord.user_command(name="Make Applicant") # type: ignore[no-untyped-call, misc]
@CommandChecks.check_interaction_user_has_committee_role
Expand Down
12 changes: 4 additions & 8 deletions cogs/make_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,10 @@
".ASPXAUTH": settings["MEMBERS_LIST_AUTH_SESSION_COOKIE"],
}

ORGANISATION_ID: "Final[str]" = settings["ORGANISATION_ID"]
GROUP_NAME: "Final[str]" = settings["_GROUP_FULL_NAME"]
GROUPED_MEMBERS_URL: "Final[str]" = (
f"https://guildofstudents.com/organisation/memberlist/{ORGANISATION_ID}/?sort=groups"
)
BASE_MEMBERS_URL: "Final[str]" = (
f"https://guildofstudents.com/organisation/memberlist/{ORGANISATION_ID}"
f"https://guildofstudents.com/organisation/memberlist/{settings['ORGANISATION_ID']}"
)
GROUPED_MEMBERS_URL: "Final[str]" = f"{BASE_MEMBERS_URL}/?sort=groups"


class MakeMemberCommandCog(TeXBotBaseCog):
Expand Down Expand Up @@ -317,7 +313,7 @@ async def member_count(self, ctx: "TeXBotApplicationContext") -> None: # type:
if "showing 100 of" in member_list_div.text.lower():
member_count: str = member_list_div.text.split(" ")[3]
await ctx.followup.send(
content=f"{GROUP_NAME} has {member_count} members! :tada:",
content=f"{self.bot.group_full_name} has {member_count} members! :tada:",
)
return

Expand All @@ -340,7 +336,7 @@ async def member_count(self, ctx: "TeXBotApplicationContext") -> None: # type:
return

await ctx.followup.send(
content=f"{GROUP_NAME} has {
content=f"{self.bot.group_full_name} has {
len(member_table.find_all('tr', {'class': ['msl_row', 'msl_altrow']}))
} members! :tada:"
)
4 changes: 2 additions & 2 deletions cogs/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@


class PingCommandCog(TeXBotBaseCog):
"""Cog class that defines the "/remindme" command and its call-back method."""
"""Cog class that defines the "/ping" command and its call-back method."""

@discord.slash_command(description="Replies with Pong!") # type: ignore[no-untyped-call, misc]
@discord.slash_command(name="ping", description="Replies with Pong!") # type: ignore[no-untyped-call, misc]
async def ping(self, ctx: "TeXBotApplicationContext") -> None: # type: ignore[misc]
"""Definition & callback response of the "ping" command."""
await ctx.respond(
Expand Down