Skip to content

Commit

Permalink
Merge pull request #1094 from givepraise/fix/last-active
Browse files Browse the repository at this point in the history
Drop last activity field on /whois
  • Loading branch information
kristoferlund committed Jun 26, 2023
2 parents 4972642 + 5e4a051 commit a3ce948
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 11 deletions.
Binary file added giveth-database-backup-2023-06-01-092920.archive
Binary file not shown.
2 changes: 0 additions & 2 deletions packages/discord-bot/src/handlers/whoami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const whoamiHandler: CommandHandler = async (
platform: account.platform,
user: account.name,
activationDate: account.createdAt,
latestUsageDate: account.updatedAt,
});
}
} else {
Expand All @@ -67,7 +66,6 @@ export const whoamiHandler: CommandHandler = async (
platform: 'DISCORD',
user: ua.name,
activationDate: ua.createdAt,
latestUsageDate: ua.updatedAt,
});
}
}
Expand Down
6 changes: 0 additions & 6 deletions packages/discord-bot/src/handlers/whois.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ export const whoisHandler: CommandHandler = async (
});

if (user) {
user.updatedAt &&
fields.push({
name: 'Latest activity',
value: new Date(user.updatedAt).toDateString(),
});

user.receivedTotalScore &&
fields.push({
name: 'Received praise total score',
Expand Down
1 change: 0 additions & 1 deletion packages/discord-bot/src/interfaces/UserState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ interface ActivatedAccount {
platform: string;
user: string;
activationDate: string;
latestUsageDate: string;
}

export interface UserState {
Expand Down
2 changes: 0 additions & 2 deletions packages/discord-bot/src/utils/embeds/stateEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export const getStateEmbed = (state: UserState): EmbedBuilder => {
account.user
}\n> Date of Activation: ${formatDate(
new Date(account.activationDate)
)}\n> Last Active: ${formatDate(
new Date(account.latestUsageDate)
)}`
)
.join('\n\n') ||
Expand Down

0 comments on commit a3ce948

Please sign in to comment.