Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ type userBan {
reason String
}

type hubBlacklist {
reason String
expires DateTime?
moderatorId String?
hubId String @db.ObjectId
enum BlockWordAction {
BLOCK_MESSAGE
BLACKLIST
SEND_ALERT
}

enum InfractionType {
Expand All @@ -53,13 +52,6 @@ enum InfractionStatus {
REVOKED
APPEALED
}

enum BlockWordAction {
BLOCK_MESSAGE
BLACKLIST
SEND_ALERT
}

model UserInfraction {
id String @id @default(nanoid(10)) @map("_id")
userId String @db.String
Expand Down
1 change: 1 addition & 0 deletions src/commands/slash/Main/blacklist/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default class ListBlacklists extends BlacklistCommand {
? await db.serverInfraction.findMany(query)
: await db.userInfraction.findMany({
where: query.where,
orderBy: { expiresAt: 'asc' },
include: { userData: { select: { username: true } } },
});

Expand Down
8 changes: 7 additions & 1 deletion src/modules/Pagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ export class Pagination {
return pageNumber - 1; // Convert to 0-based index
}
catch (error) {
Logger.error('Page selection error:', error);
if (
!error.message.includes(
'Collector received no interactions before ending with reason: time',
)
) {
Logger.error('Page selection error:', error);
}
return null;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/locale.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export type TranslationKeys = {
'errors.unknownServer': 'emoji';
'errors.unknownNetworkMessage': 'emoji';
'errors.userNotFound': 'emoji';
'errors.blacklisted': 'emoji';
'errors.blacklisted': 'emoji' | 'hub';
'errors.userBlacklisted': 'emoji';
'errors.serverBlacklisted': 'emoji';
'errors.serverNotBlacklisted': 'emoji';
Expand Down