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

Commit

Permalink
fix: alert at no profile (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Jul 4, 2021
1 parent 7a962b1 commit d5519d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/check-image/check-image.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Message } from 'discord.js';

@Injectable()
export class CheckImageService {
private alertAt = 10;
private countsDictionary: { [key: string]: number } = {};

public checkImage(message: Message): void {
Expand All @@ -14,7 +15,7 @@ export class CheckImageService {
this.countsDictionary[authorId] = 1;
}

if (this.countsDictionary[authorId] > 3) {
if (this.countsDictionary[authorId] > this.alertAt) {
message.author.send(
'Please consider adding a profile picture, it is more friendly. It does not have to be you, but something unique, like a cartoon version of yourself or a pet.',
);
Expand Down

0 comments on commit d5519d0

Please sign in to comment.