Skip to content

Commit c0152de

Browse files
committed
Make variable names clearer
1 parent c6ae8ce commit c0152de

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

close_message/close_message.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
from core import time
88
from core.models import PermissionLevel
99

10-
CLOSING_MESSAGE = "Feel free to open a new thread if you need anything else."
10+
DEFAULT_CLOSE_MESSAGE = "Feel free to open a new thread if you need anything else."
1111

1212

13-
class UserFriendlyTimeOnly(time.UserFriendlyTime):
13+
class UserFriendlyDuration(time.UserFriendlyTime):
1414
"""
1515
A converter which parses user-friendly time durations.
1616
@@ -46,9 +46,9 @@ async def convert(self, ctx: commands.Context, argument: str) -> str:
4646

4747
if self.arg:
4848
add_period = not self.arg.endswith((".", "!", "?"))
49-
self.arg = self.arg + (". " if add_period else " ") + CLOSING_MESSAGE
49+
self.arg = self.arg + (". " if add_period else " ") + DEFAULT_CLOSE_MESSAGE
5050
else:
51-
self.arg = CLOSING_MESSAGE
51+
self.arg = DEFAULT_CLOSE_MESSAGE
5252

5353
return self
5454

@@ -93,15 +93,15 @@ async def close_message(
9393
# We're doing the conversion here to make the argument optional
9494
# while still passing the converted argument instead of an
9595
# empty string to the close command.
96-
after = await UserFriendlyTimeOnly(default_close_duration='15m').convert(ctx, after)
96+
after = await UserFriendlyDuration(default_close_duration='15m').convert(ctx, after)
9797
return await self.close_command(ctx, after=after)
9898

9999
@close_message.command(aliases=('msg',))
100100
@checks.has_permissions(PermissionLevel.SUPPORTER)
101101
@checks.thread_only()
102102
async def message(self, ctx: commands.Context) -> None:
103-
"""Send the closing message."""
104-
await ctx.send(f'> {CLOSING_MESSAGE}')
103+
"""Send the default close message."""
104+
await ctx.send(f'> {DEFAULT_CLOSE_MESSAGE}')
105105

106106

107107
def setup(bot: ModmailBot) -> None:

0 commit comments

Comments
 (0)