Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

added "joined at" to member leave notifications #217

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

TheCataliasTNT2k
Copy link
Contributor

Description
This adds additional information for the member leave notifications
It will add the latest join of the member to the message.

@TheCataliasTNT2k TheCataliasTNT2k requested review from a team as code owners February 2, 2023 17:35
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 2, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 31a56d1
Status:⚡️  Build in progress...

View logs

@codeclimate
Copy link

codeclimate bot commented Feb 2, 2023

Code Climate has analyzed commit 31a56d1 and detected 0 issues on this pull request.

View more on Code Climate.

@@ -24,7 +24,8 @@ message_id: Message ID
created_at: Created At

member_joined_server: "{} ({}) just joined the server!"
member_left_server: "**{}** just left the server!"
member_left_server_with_joined: "**{}** ({}) just left the server! Latest join was at {}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
member_left_server_with_joined: "**{}** ({}) just left the server! Latest join was at {}"
member_left_server_with_joined: "**{}** ({}) just left the server! The most recent join occurred at {}."

Or even better: "The most recent join occurred on 02/24/2023 at 15:00:00."
This template makes use of the correct prepositions.

@@ -310,7 +310,12 @@ async def on_member_remove(self, member: Member):
if (log_channel := await self.get_logging_channel(LoggingSettings.member_leave_channel)) is None:
return

await log_channel.send(t.member_left_server(member))
if join := member.joined_at:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if join := member.joined_at:
if joinDate := member.joined_at:

await log_channel.send(t.member_left_server(member))
if join := member.joined_at:
await log_channel.send(
t.member_left_server_with_joined(member, member.id, join.strftime("%m/%d/%Y, %H:%M:%S"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
t.member_left_server_with_joined(member, member.id, join.strftime("%m/%d/%Y, %H:%M:%S"))
t.member_left_server_with_joined(member, member.id, joinDate.strftime("%m/%d/%Y, %H:%M:%S"))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants