Skip to content

Commit e05a900

Browse files
Fix misc. command details (#494)
1 parent a5e7eb3 commit e05a900

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ GROUP_SHORT_NAME=[Replace with the short colloquial name of your community group
2424

2525
# The URL of the page where guests can purchase a full membership to join your community group
2626
# Must be a valid URL
27-
PURCHASE_MEMBERSHIP_URL=[Replace with your group\'s purchase=membership URL]
27+
PURCHASE_MEMBERSHIP_URL=[Replace with your group\'s purchase-membership URL]
28+
29+
# The URL of the page containing information about the perks of buying a full membership to join your community group
30+
# Must be a valid URL
31+
MEMBERSHIP_PERKS_URL=[Replace with your group\'s membership-perks URL]
2832

2933
# The invite link URL to allow users to join your community group's Discord server
3034
# Must be a valid URL

cogs/make_applicant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async def _perform_make_applicant(
125125

126126

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

130130
@staticmethod
131131
async def autocomplete_get_members(
@@ -195,7 +195,7 @@ async def make_applicant( # type: ignore[misc]
195195

196196

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

200200
@discord.user_command(name="Make Applicant") # type: ignore[no-untyped-call, misc]
201201
@CommandChecks.check_interaction_user_has_committee_role

cogs/make_member.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,10 @@
6262
".ASPXAUTH": settings["MEMBERS_LIST_AUTH_SESSION_COOKIE"],
6363
}
6464

65-
ORGANISATION_ID: "Final[str]" = settings["ORGANISATION_ID"]
66-
GROUP_NAME: "Final[str]" = settings["_GROUP_FULL_NAME"]
67-
GROUPED_MEMBERS_URL: "Final[str]" = (
68-
f"https://guildofstudents.com/organisation/memberlist/{ORGANISATION_ID}/?sort=groups"
69-
)
7065
BASE_MEMBERS_URL: "Final[str]" = (
71-
f"https://guildofstudents.com/organisation/memberlist/{ORGANISATION_ID}"
66+
f"https://guildofstudents.com/organisation/memberlist/{settings['ORGANISATION_ID']}"
7267
)
68+
GROUPED_MEMBERS_URL: "Final[str]" = f"{BASE_MEMBERS_URL}/?sort=groups"
7369

7470

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

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

342338
await ctx.followup.send(
343-
content=f"{GROUP_NAME} has {
339+
content=f"{self.bot.group_full_name} has {
344340
len(member_table.find_all('tr', {'class': ['msl_row', 'msl_altrow']}))
345341
} members! :tada:"
346342
)

cogs/ping.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818

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

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

0 commit comments

Comments
 (0)