From 66526b09bb86614a90a4d7b3d5425a42ca335108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Mon, 4 Aug 2025 00:26:39 +0100 Subject: [PATCH 1/4] feat: Update log messages. --- .../journalling/discord/guild-ban-add.ts | 14 +++++-- .../journalling/discord/guild-ban-remove.ts | 14 +++++-- .../journalling/discord/guild-member-add.ts | 14 +++++-- .../discord/guild-member-remove.ts | 14 +++++-- .../discord/message-delete-bulk.ts | 24 +++++++----- .../journalling/discord/message-delete.ts | 37 +++++++++++-------- .../journalling/discord/message-update.ts | 34 ++++++++++------- 7 files changed, 97 insertions(+), 54 deletions(-) diff --git a/source/library/stores/journalling/discord/guild-ban-add.ts b/source/library/stores/journalling/discord/guild-ban-add.ts index 2c34045df..05b1a2a97 100644 --- a/source/library/stores/journalling/discord/guild-ban-add.ts +++ b/source/library/stores/journalling/discord/guild-ban-add.ts @@ -3,11 +3,17 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"guildBanAdd"> = (client, [user, _], { guildLocale }) => { const strings = constants.contexts.guildBanAdd({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.user.banned} ${strings.title}`, - color: constants.colours.failure, - description: strings.description({ user: client.diagnostics.user(user) }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.failure, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.user.banned} ${strings.title}\n${strings.description({ user: client.diagnostics.user(user) })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/discord/guild-ban-remove.ts b/source/library/stores/journalling/discord/guild-ban-remove.ts index ece7d2cc9..0f79939eb 100644 --- a/source/library/stores/journalling/discord/guild-ban-remove.ts +++ b/source/library/stores/journalling/discord/guild-ban-remove.ts @@ -3,11 +3,17 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"guildBanRemove"> = (client, [user, _], { guildLocale }) => { const strings = constants.contexts.guildBanRemove({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.user.unbanned} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ user: client.diagnostics.user(user) }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.user.unbanned} ${strings.title}\n${strings.description({ user: client.diagnostics.user(user) })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/discord/guild-member-add.ts b/source/library/stores/journalling/discord/guild-member-add.ts index f5754cec5..6e359a529 100644 --- a/source/library/stores/journalling/discord/guild-member-add.ts +++ b/source/library/stores/journalling/discord/guild-member-add.ts @@ -3,11 +3,17 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"guildMemberAdd"> = (client, [_, user], { guildLocale }) => { const strings = constants.contexts.guildMemberAdd({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.user.joined} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ user: client.diagnostics.user(user) }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.user.joined} ${strings.title}\n${strings.description({ user: client.diagnostics.user(user) })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/discord/guild-member-remove.ts b/source/library/stores/journalling/discord/guild-member-remove.ts index 48a7bccf7..6936a61be 100644 --- a/source/library/stores/journalling/discord/guild-member-remove.ts +++ b/source/library/stores/journalling/discord/guild-member-remove.ts @@ -6,11 +6,17 @@ const logger: EventLogger<"guildMemberRemove"> = (client, [user, _], { guildLoca locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.user.left} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ user: client.diagnostics.user(user) }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.user.left} ${strings.title}\n${strings.description({ user: client.diagnostics.user(user) })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/discord/message-delete-bulk.ts b/source/library/stores/journalling/discord/message-delete-bulk.ts index b7feac83a..491526963 100644 --- a/source/library/stores/journalling/discord/message-delete-bulk.ts +++ b/source/library/stores/journalling/discord/message-delete-bulk.ts @@ -12,16 +12,22 @@ const logger: EventLogger<"messageDeleteBulk"> = (client, [payload], { guildLoca const strings = constants.contexts.messageDeleteBulk({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.message.deleted} ${strings.title}`, - color: constants.colours.failure, - description: strings.description({ - messages: client.pluralise("events.messageDeleteBulk.description.messages", guildLocale, { - quantity: messages.length, - }), - channel: mention(payload.channelId, { type: "channel" }), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.failure, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.message.deleted} ${strings.title}\n${strings.description({ + messages: client.pluralise("events.messageDeleteBulk.description.messages", guildLocale, { + quantity: messages.length, + }), + channel: mention(payload.channelId, { type: "channel" }), + })}`, + }, + ], }, ], files: [{ name: "log.txt", blob: new Blob([messageLog]) } as Discord.FileContent], diff --git a/source/library/stores/journalling/discord/message-delete.ts b/source/library/stores/journalling/discord/message-delete.ts index 59296e0bb..f6fa4c117 100644 --- a/source/library/stores/journalling/discord/message-delete.ts +++ b/source/library/stores/journalling/discord/message-delete.ts @@ -10,23 +10,28 @@ const logger: EventLogger<"messageDelete"> = (client, [payload, _], { guildLocal const strings = constants.contexts.messageDelete({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.message.deleted} ${strings.title}`, - color: constants.colours.failure, - description: strings.description({ - user: client.diagnostics.user(message.author), - channel: mention(message.channelId, { type: "channel" }), - }), - fields: - message.content.length > 0 - ? [ - { - name: strings.fields.content, - value: codeMultiline(message.content), - }, - ] - : undefined, + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.failure, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.message.deleted} ${strings.title}\n${strings.description({ + user: client.diagnostics.user(message.author), + channel: mention(message.channelId, { type: "channel" }), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.content}\n${codeMultiline(message.content)}`, + }, + ], }, ], files: message.attachments diff --git a/source/library/stores/journalling/discord/message-update.ts b/source/library/stores/journalling/discord/message-update.ts index 7ec103c33..88d1abb38 100644 --- a/source/library/stores/journalling/discord/message-update.ts +++ b/source/library/stores/journalling/discord/message-update.ts @@ -13,24 +13,32 @@ const logger: EventLogger<"messageUpdate"> = (client, [message], { guildLocale } const strings = constants.contexts.messageUpdate({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.message.updated} ${strings.title}`, - color: constants.colours.notice, - description: strings.description({ - user: client.diagnostics.user(message.author), - channel: mention(message.channelId, { type: "channel" }), - }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.notice, + components: [ { - name: strings.fields.before, - value: codeMultiline( + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.message.updated} ${strings.title}\n${strings.description({ + user: client.diagnostics.user(message.author), + channel: mention(message.channelId, { type: "channel" }), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.before}\n${codeMultiline( trim(oldMessage.content, constants.discord.MAXIMUM_EMBED_FIELD_LENGTH - 6), - ), + )}`, }, { - name: strings.fields.after, - value: codeMultiline(trim(message.content, constants.discord.MAXIMUM_EMBED_FIELD_LENGTH - 6)), + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.after}\n${codeMultiline(trim(message.content, constants.discord.MAXIMUM_EMBED_FIELD_LENGTH - 6))}`, }, ], }, From a787a4b8e4faa682d0f2a15d44251fcf7f058b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Mon, 4 Aug 2025 00:26:45 +0100 Subject: [PATCH 2/4] feat: Update log emojis. --- source/constants/emojis/events.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/constants/emojis/events.ts b/source/constants/emojis/events.ts index 60bb65475..7bb0a3779 100644 --- a/source/constants/emojis/events.ts +++ b/source/constants/emojis/events.ts @@ -7,8 +7,8 @@ export default Object.freeze({ kicked: "🚪", }, message: { - updated: "⬆️", - deleted: "❌", + updated: "🔄", + deleted: "🗑️", }, entryRequest: { submitted: "ℹ️", From 36c2c3cfe8f6c12e6961eaeb8054f716148a9452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Mon, 4 Aug 2025 11:35:01 +0100 Subject: [PATCH 3/4] feat: Update embeds in the remaining events. --- source/library/models/documents/report.ts | 2 +- .../journalling/rost/entry-request-accept.ts | 22 +++++++--- .../journalling/rost/entry-request-reject.ts | 22 +++++++--- .../journalling/rost/entry-request-submit.ts | 30 ++++++++----- .../journalling/rost/guild-member-kick.ts | 20 ++++++--- .../stores/journalling/rost/inquiry-open.ts | 14 ++++-- .../journalling/rost/member-timeout-add.ts | 32 ++++++++------ .../journalling/rost/member-timeout-remove.ts | 20 ++++++--- .../journalling/rost/member-warn-add.ts | 28 +++++++----- .../journalling/rost/member-warn-remove.ts | 28 +++++++----- .../stores/journalling/rost/praise-add.ts | 37 +++++++++------- .../stores/journalling/rost/purge-begin.ts | 43 +++++++++++-------- .../stores/journalling/rost/purge-end.ts | 43 +++++++++++-------- .../stores/journalling/rost/report-submit.ts | 38 ++++++++-------- .../stores/journalling/rost/resource-send.ts | 22 +++++++--- .../journalling/rost/slowmode-disable.ts | 22 +++++++--- .../journalling/rost/slowmode-downgrade.ts | 26 +++++++---- .../journalling/rost/slowmode-enable.ts | 24 +++++++---- .../journalling/rost/slowmode-upgrade.ts | 26 +++++++---- .../journalling/rost/suggestion-send.ts | 22 +++++++--- .../stores/journalling/rost/ticket-open.ts | 22 +++++++--- 21 files changed, 342 insertions(+), 201 deletions(-) diff --git a/source/library/models/documents/report.ts b/source/library/models/documents/report.ts index 69e5924e3..a5f6e95ac 100644 --- a/source/library/models/documents/report.ts +++ b/source/library/models/documents/report.ts @@ -1,7 +1,7 @@ interface ReportFormData { reason: string; users: string; - messageLink?: string; + messageLink: string; } interface ReportDocument { diff --git a/source/library/stores/journalling/rost/entry-request-accept.ts b/source/library/stores/journalling/rost/entry-request-accept.ts index 433affa90..00940f0ef 100644 --- a/source/library/stores/journalling/rost/entry-request-accept.ts +++ b/source/library/stores/journalling/rost/entry-request-accept.ts @@ -6,14 +6,22 @@ const logger: EventLogger<"entryRequestAccept"> = (client, [user, author], { gui locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.entryRequest.accepted} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ - user: client.diagnostics.user(user), - moderator: client.diagnostics.member(author), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.entryRequest.accepted} ${strings.title}\n${strings.description( + { + user: client.diagnostics.user(user), + moderator: client.diagnostics.member(author), + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/entry-request-reject.ts b/source/library/stores/journalling/rost/entry-request-reject.ts index 8efef80b6..6724dc60e 100644 --- a/source/library/stores/journalling/rost/entry-request-reject.ts +++ b/source/library/stores/journalling/rost/entry-request-reject.ts @@ -6,14 +6,22 @@ const logger: EventLogger<"entryRequestReject"> = (client, [user, author], { gui locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.entryRequest.rejected} ${strings.title}`, - color: constants.colours.failure, - description: strings.description({ - user: client.diagnostics.user(user), - moderator: client.diagnostics.member(author), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.failure, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.entryRequest.rejected} ${strings.title}\n${strings.description( + { + user: client.diagnostics.user(user), + moderator: client.diagnostics.member(author), + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/entry-request-submit.ts b/source/library/stores/journalling/rost/entry-request-submit.ts index ca3516c29..1a7bbbd6d 100644 --- a/source/library/stores/journalling/rost/entry-request-submit.ts +++ b/source/library/stores/journalling/rost/entry-request-submit.ts @@ -7,23 +7,31 @@ const logger: EventLogger<"entryRequestSubmit"> = (client, [user, entryRequest], ...constants.contexts.entryRequestSubmit({ localise: client.localise, locale: guildLocale }), }; return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.entryRequest.submitted} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ user: client.diagnostics.user(user) }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ { - name: strings.fields.reason, - value: codeMultiline(entryRequest.formData.reason), + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.entryRequest.submitted} ${strings.title}\n${strings.description({ user: client.diagnostics.user(user) })}`, }, { - name: strings.fields.aim, - value: codeMultiline(entryRequest.formData.aim), + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, }, { - name: strings.fields.whereFound, - value: codeMultiline(entryRequest.formData.whereFound), + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.reason}\n${codeMultiline(entryRequest.formData.reason)}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.aim}\n${codeMultiline(entryRequest.formData.aim)}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.whereFound}\n${codeMultiline(entryRequest.formData.whereFound)}`, }, ], }, diff --git a/source/library/stores/journalling/rost/guild-member-kick.ts b/source/library/stores/journalling/rost/guild-member-kick.ts index 7f875f121..186d68bcb 100644 --- a/source/library/stores/journalling/rost/guild-member-kick.ts +++ b/source/library/stores/journalling/rost/guild-member-kick.ts @@ -3,14 +3,20 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"guildMemberKick"> = (client, [user, author], { guildLocale }) => { const strings = constants.contexts.memberKick({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.user.kicked} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - user: client.diagnostics.user(user), - moderator: client.diagnostics.member(author), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.user.kicked} ${strings.title}\n${strings.description({ + user: client.diagnostics.user(user), + moderator: client.diagnostics.member(author), + })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/inquiry-open.ts b/source/library/stores/journalling/rost/inquiry-open.ts index 87d669372..158f966f3 100644 --- a/source/library/stores/journalling/rost/inquiry-open.ts +++ b/source/library/stores/journalling/rost/inquiry-open.ts @@ -3,11 +3,17 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"inquiryOpen"> = (client, [member, _], { guildLocale }) => { const strings = constants.contexts.inquiryOpen({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.ticket} ${strings.title}`, - color: constants.colours.notice, - description: strings.description({ moderator: client.diagnostics.member(member) }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.notice, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.ticket} ${strings.title}\n${strings.description({ moderator: client.diagnostics.member(member) })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/member-timeout-add.ts b/source/library/stores/journalling/rost/member-timeout-add.ts index 081b2f3d7..fddb9d462 100644 --- a/source/library/stores/journalling/rost/member-timeout-add.ts +++ b/source/library/stores/journalling/rost/member-timeout-add.ts @@ -7,22 +7,30 @@ const logger: EventLogger<"memberTimeoutAdd"> = (client, [member, until, reason, locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.timeout.added} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - user: client.diagnostics.member(member), - moderator: client.diagnostics.user(author), - }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ { - name: strings.fields.reason, - value: reason, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.timeout.added} ${strings.title}\n${strings.description({ + user: client.diagnostics.member(member), + moderator: client.diagnostics.user(author), + })}`, }, { - name: strings.fields.lastsUntil, - value: timestamp(until, { format: "relative" }), + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.reason}\n${reason}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.lastsUntil}\n${timestamp(until, { format: "relative" })}`, }, ], }, diff --git a/source/library/stores/journalling/rost/member-timeout-remove.ts b/source/library/stores/journalling/rost/member-timeout-remove.ts index c03e94193..7282a5546 100644 --- a/source/library/stores/journalling/rost/member-timeout-remove.ts +++ b/source/library/stores/journalling/rost/member-timeout-remove.ts @@ -6,14 +6,20 @@ const logger: EventLogger<"memberTimeoutRemove"> = (client, [member, author], { locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.timeout.removed} ${strings.title}`, - color: constants.colours.notice, - description: strings.description({ - user: client.diagnostics.member(member), - moderator: client.diagnostics.user(author), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.notice, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.timeout.removed} ${strings.title}\n${strings.description({ + user: client.diagnostics.member(member), + moderator: client.diagnostics.user(author), + })}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/member-warn-add.ts b/source/library/stores/journalling/rost/member-warn-add.ts index dab6f06bd..7e2570564 100644 --- a/source/library/stores/journalling/rost/member-warn-add.ts +++ b/source/library/stores/journalling/rost/member-warn-add.ts @@ -3,18 +3,26 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"memberWarnAdd"> = (client, [member, warning, author], { guildLocale }) => { const strings = constants.contexts.memberWarnAdd({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.warned} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - user: client.diagnostics.member(member), - moderator: client.diagnostics.user(author), - }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ { - name: strings.fields.reason, - value: warning.reason, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.warned} ${strings.title}\n${strings.description({ + user: client.diagnostics.member(member), + moderator: client.diagnostics.user(author), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.reason}\n${warning.reason}`, }, ], }, diff --git a/source/library/stores/journalling/rost/member-warn-remove.ts b/source/library/stores/journalling/rost/member-warn-remove.ts index 1a8b4fa26..1ddd320e1 100644 --- a/source/library/stores/journalling/rost/member-warn-remove.ts +++ b/source/library/stores/journalling/rost/member-warn-remove.ts @@ -3,18 +3,26 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"memberWarnRemove"> = (client, [member, warning, author], { guildLocale }) => { const strings = constants.contexts.memberWarnRemove({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.pardoned} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ - user: client.diagnostics.member(member), - moderator: client.diagnostics.user(author), - }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ { - name: strings.fields.warning, - value: warning.reason, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.pardoned} ${strings.title}\n${strings.description({ + user: client.diagnostics.member(member), + moderator: client.diagnostics.user(author), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.warning}\n${warning.reason}`, }, ], }, diff --git a/source/library/stores/journalling/rost/praise-add.ts b/source/library/stores/journalling/rost/praise-add.ts index ba9437004..c4c7a6db2 100644 --- a/source/library/stores/journalling/rost/praise-add.ts +++ b/source/library/stores/journalling/rost/praise-add.ts @@ -3,23 +3,28 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"praiseAdd"> = (client, [member, praise, author], { guildLocale }) => { const strings = constants.contexts.praiseAdd({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.praised} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ - user: client.diagnostics.member(member), - moderator: client.diagnostics.user(author), - }), - fields: - praise.comment !== undefined - ? [ - { - name: strings.fields.comment, - value: praise.comment, - }, - ] - : undefined, + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.praised} ${strings.title}\n${strings.description({ + user: client.diagnostics.member(member), + moderator: client.diagnostics.user(author), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.comment}\n${praise.comment}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/purge-begin.ts b/source/library/stores/journalling/rost/purge-begin.ts index 8fbf366f4..bbf90c12c 100644 --- a/source/library/stores/journalling/rost/purge-begin.ts +++ b/source/library/stores/journalling/rost/purge-begin.ts @@ -4,26 +4,31 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"purgeBegin"> = (client, [member, channel, messageCount, author], { guildLocale }) => { const strings = constants.contexts.purgeBegin({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.purging.begin} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - moderator: client.diagnostics.member(member), - messages: client.pluralise("events.purgeBegin.description.messages", guildLocale, { - quantity: messageCount, - }), - channel: mention(channel.id, { type: "channel" }), - }), - fields: - author !== undefined - ? [ - { - name: strings.fields.author, - value: client.diagnostics.user(author), - }, - ] - : undefined, + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.purging.begin} ${strings.title}\n${strings.description({ + moderator: client.diagnostics.member(member), + messages: client.pluralise("events.purgeBegin.description.messages", guildLocale, { + quantity: messageCount, + }), + channel: mention(channel.id, { type: "channel" }), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.author}\n${client.diagnostics.user(author!)}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/purge-end.ts b/source/library/stores/journalling/rost/purge-end.ts index 9e3452304..375c4919c 100644 --- a/source/library/stores/journalling/rost/purge-end.ts +++ b/source/library/stores/journalling/rost/purge-end.ts @@ -4,26 +4,31 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"purgeEnd"> = (client, [member, channel, messageCount, author], { guildLocale }) => { const strings = constants.contexts.purgeEnd({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.purging.end} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ - moderator: client.diagnostics.member(member), - messages: client.pluralise("events.purgeEnd.description.messages", guildLocale, { - quantity: messageCount, - }), - channel: mention(channel.id, { type: "channel" }), - }), - fields: - author !== undefined - ? [ - { - name: strings.fields.author, - value: client.diagnostics.user(author), - }, - ] - : undefined, + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.purging.end} ${strings.title}\n${strings.description({ + moderator: client.diagnostics.member(member), + messages: client.pluralise("events.purgeEnd.description.messages", guildLocale, { + quantity: messageCount, + }), + channel: mention(channel.id, { type: "channel" }), + })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.author}\n${client.diagnostics.user(author!)}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/report-submit.ts b/source/library/stores/journalling/rost/report-submit.ts index 9b1cf3c95..3fc93d388 100644 --- a/source/library/stores/journalling/rost/report-submit.ts +++ b/source/library/stores/journalling/rost/report-submit.ts @@ -3,28 +3,32 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"reportSubmit"> = (client, [author, report], { guildLocale }) => { const strings = constants.contexts.reportSubmit({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.report} ${strings.title}`, - color: constants.colours.failure, - description: strings.description({ user: client.diagnostics.member(author) }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.failure, + components: [ { - name: strings.fields.reason, - value: report.formData.reason, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.report} ${strings.title}\n${strings.description({ user: client.diagnostics.member(author) })}`, }, { - name: strings.fields.reportedUsers, - value: report.formData.users, + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.reason}\n${report.formData.reason}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.reportedUsers}\n${report.formData.users}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.messageLink}\n${report.formData.messageLink}`, }, - ...(report.formData.messageLink !== undefined - ? [ - { - name: strings.fields.messageLink, - value: report.formData.messageLink, - }, - ] - : []), ], }, ], diff --git a/source/library/stores/journalling/rost/resource-send.ts b/source/library/stores/journalling/rost/resource-send.ts index f34b7d2b1..25f67e54f 100644 --- a/source/library/stores/journalling/rost/resource-send.ts +++ b/source/library/stores/journalling/rost/resource-send.ts @@ -3,15 +3,23 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"resourceSend"> = (client, [author, resource], { guildLocale }) => { const strings = constants.contexts.resourceSend({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.resource} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ user: client.diagnostics.member(author) }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ { - name: strings.fields.resource, - value: resource.formData.resource, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.resource} ${strings.title}\n${strings.description({ user: client.diagnostics.member(author) })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.resource}\n${resource.formData.resource}`, }, ], }, diff --git a/source/library/stores/journalling/rost/slowmode-disable.ts b/source/library/stores/journalling/rost/slowmode-disable.ts index 13e389abd..10bea93b4 100644 --- a/source/library/stores/journalling/rost/slowmode-disable.ts +++ b/source/library/stores/journalling/rost/slowmode-disable.ts @@ -4,14 +4,22 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"slowmodeDisable"> = (client, [user, channel], { guildLocale }) => { const strings = constants.contexts.slowmodeDisable({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.slowmode.disabled} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - moderator: client.diagnostics.user(user), - channel: mention(channel.id, { type: "channel" }), - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.slowmode.disabled} ${strings.title}\n${strings.description( + { + moderator: client.diagnostics.user(user), + channel: mention(channel.id, { type: "channel" }), + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/slowmode-downgrade.ts b/source/library/stores/journalling/rost/slowmode-downgrade.ts index f31a39995..b60248b35 100644 --- a/source/library/stores/journalling/rost/slowmode-downgrade.ts +++ b/source/library/stores/journalling/rost/slowmode-downgrade.ts @@ -11,16 +11,24 @@ const logger: EventLogger<"slowmodeDowngrade"> = ( locale: guildLocale, }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.slowmode.downgraded} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - moderator: client.diagnostics.user(user), - channel: mention(channel.id, { type: "channel" }), - level_before: previousLevel, - level_after: currentLevel, - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.slowmode.downgraded} ${strings.title}\n${strings.description( + { + moderator: client.diagnostics.user(user), + channel: mention(channel.id, { type: "channel" }), + level_before: previousLevel, + level_after: currentLevel, + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/slowmode-enable.ts b/source/library/stores/journalling/rost/slowmode-enable.ts index 447b02316..a8b464e98 100644 --- a/source/library/stores/journalling/rost/slowmode-enable.ts +++ b/source/library/stores/journalling/rost/slowmode-enable.ts @@ -4,15 +4,23 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"slowmodeEnable"> = (client, [user, channel, level], { guildLocale }) => { const strings = constants.contexts.slowmodeEnable({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.slowmode.enabled} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - moderator: client.diagnostics.user(user), - channel: mention(channel.id, { type: "channel" }), - level, - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.slowmode.enabled} ${strings.title}\n${strings.description( + { + moderator: client.diagnostics.user(user), + channel: mention(channel.id, { type: "channel" }), + level, + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/slowmode-upgrade.ts b/source/library/stores/journalling/rost/slowmode-upgrade.ts index 2d26aa26d..4dbe1efc4 100644 --- a/source/library/stores/journalling/rost/slowmode-upgrade.ts +++ b/source/library/stores/journalling/rost/slowmode-upgrade.ts @@ -8,16 +8,24 @@ const logger: EventLogger<"slowmodeUpgrade"> = ( ) => { const strings = constants.contexts.slowmodeUpgrade({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.slowmode.upgraded} ${strings.title}`, - color: constants.colours.warning, - description: strings.description({ - moderator: client.diagnostics.user(user), - channel: mention(channel.id, { type: "channel" }), - level_before: previousLevel, - level_after: currentLevel, - }), + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.warning, + components: [ + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.slowmode.upgraded} ${strings.title}\n${strings.description( + { + moderator: client.diagnostics.user(user), + channel: mention(channel.id, { type: "channel" }), + level_before: previousLevel, + level_after: currentLevel, + }, + )}`, + }, + ], }, ], }; diff --git a/source/library/stores/journalling/rost/suggestion-send.ts b/source/library/stores/journalling/rost/suggestion-send.ts index 9373ab64b..6d57a9560 100644 --- a/source/library/stores/journalling/rost/suggestion-send.ts +++ b/source/library/stores/journalling/rost/suggestion-send.ts @@ -3,15 +3,23 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"suggestionSend"> = (client, [member, suggestion], { guildLocale }) => { const strings = constants.contexts.suggestionSend({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.suggestion} ${strings.title}`, - color: constants.colours.success, - description: strings.description({ user: client.diagnostics.member(member) }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ { - name: strings.fields.suggestion, - value: suggestion.formData.suggestion, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.suggestion} ${strings.title}\n${strings.description({ user: client.diagnostics.member(member) })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.suggestion}\n${suggestion.formData.suggestion}`, }, ], }, diff --git a/source/library/stores/journalling/rost/ticket-open.ts b/source/library/stores/journalling/rost/ticket-open.ts index 934e9deb7..8bbbe1ee3 100644 --- a/source/library/stores/journalling/rost/ticket-open.ts +++ b/source/library/stores/journalling/rost/ticket-open.ts @@ -3,15 +3,23 @@ import type { EventLogger } from "rost/stores/journalling/loggers"; const logger: EventLogger<"ticketOpen"> = (client, [member, ticket], { guildLocale }) => { const strings = constants.contexts.ticketOpen({ localise: client.localise, locale: guildLocale }); return { - embeds: [ + flags: Discord.MessageFlags.IsComponentV2, + components: [ { - title: `${constants.emojis.events.ticket} ${strings.title}`, - color: constants.colours.notice, - description: strings.description({ user: client.diagnostics.member(member) }), - fields: [ + type: Discord.MessageComponentTypes.Container, + accentColor: constants.colours.success, + components: [ { - name: strings.fields.topic, - value: ticket.formData.topic, + type: Discord.MessageComponentTypes.TextDisplay, + content: `# ${constants.emojis.events.ticket} ${strings.title}\n${strings.description({ user: client.diagnostics.member(member) })}`, + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### ${strings.fields.topic}\n${ticket.formData.topic}`, }, ], }, From 7f10d1a10a45ae4124ad86b23b320e25d49ae269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorian=20Oszcz=C4=99da?= Date: Mon, 1 Sep 2025 22:47:08 +0100 Subject: [PATCH 4/4] feat: Add banned topics. --- assets/localisations/services/en-GB.json | 103 ++++++++++-------- source/constants/contexts.ts | 43 ++++++++ .../library/services/notices/information.ts | 20 ++++ 3 files changed, 120 insertions(+), 46 deletions(-) diff --git a/assets/localisations/services/en-GB.json b/assets/localisations/services/en-GB.json index b1e78184c..653aa58a7 100644 --- a/assets/localisations/services/en-GB.json +++ b/assets/localisations/services/en-GB.json @@ -1,47 +1,58 @@ { - "notices.lastUpdate": "Last updated: {date}", - "notices.information.sections.guidelines.title": "Guidelines", - "notices.information.sections.learning.title": "Learning", - "notices.information.sections.learning.buttons.resources": "Open Resources", - "notices.information.sections.learning.buttons.resource": "Add Resource", - "notices.information.sections.socials.buttons.website": "Website", - "notices.information.sections.socials.buttons.discord": "Discord", - "notices.information.sections.socials.buttons.instagram": "Instagram", - "notices.information.sections.socials.buttons.github": "GitHub", - "notices.information.sections.selfServe.title": "Self-serve", - "notices.information.sections.selfServe.buttons.roles": "Select Roles", - "notices.information.sections.selfServe.buttons.suggestion": "Suggest Idea", - "notices.information.sections.selfServe.buttons.report": "Report User", - "notices.information.sections.selfServe.buttons.ticket": "Open Ticket", - "reports.users": "Reported users", - "reports.reason": "Reason for report", - "reports.link": "Link to message", - "reports.noLinkProvided": "No link to message provided.", - "reports.previousInfractions": "Previous infractions of {username}", - "reports.noReports": "There are no unresolved user reports.", - "resources.noResources": "There are no new resource submissions.", - "suggestion.suggestion": "Suggestion", - "suggestions.noSuggestions": "There are no new server suggestions.", - "tickets.noTickets": "There are no open tickets.", - "entryRequests.noEntryRequests": "There are no unresolved requests to enter the server.", - "submittedBy": "Submitted by", - "submittedAt": "Submitted at", - "markResolved": "Mark issue as resolved", - "markUnresolved": "Mark issue as unresolved", - "alreadyMarkedResolved.title": "Already marked resolved", - "alreadyMarkedResolved.description": "This issue has already been marked resolved.", - "alreadyMarkedUnresolved.title": "Already marked unresolved", - "alreadyMarkedUnresolved.description": "This issue has already been marked unresolved.", - "remove": "Remove", - "cannotRemovePrompt.title": "Cannot remove prompt", - "cannotRemovePrompt.description": "You cannot remove this prompt.", - "close": "Close", - "cannotCloseIssue.title": "Cannot close issue", - "cannotCloseIssue.description": "You cannot close this issue.", - "allUpToDate": "All up to date!", - "antiFlood.floodDetectedAndTimedOut.title": "Flood detected", - "antiFlood.floodDetectedAndTimedOut.description": "{user_mention} has been detected to be flooding the server, having posted {messages} in a span of {interval}, and has subsequently been timed out for {duration}.", - "antiFlood.floodDetectedAndTimedOut.description.messages.one": "{one} message", - "antiFlood.floodDetectedAndTimedOut.description.messages.two": "{two} messages", - "antiFlood.floodDetectedAndTimedOut.description.messages.many": "{many} messages" -} + "notices.lastUpdate": "Last updated: {date}", + "notices.information.sections.guidelines.title": "Guidelines", + "notices.information.sections.bannedTopics.title": "Banned Topics", + "notices.information.sections.bannedTopics.topics.socialIssues.title": "Social issues and movements", + "notices.information.sections.bannedTopics.topics.socialIssues.examples": "e.g. Gender, Abortion, Migration, Crime, etc.", + "notices.information.sections.bannedTopics.topics.religions.title": "Religion and theology", + "notices.information.sections.bannedTopics.topics.religions.examples": "e.g. Christianity, Islam, Judaism, Atheism, Agnosticism, etc.", + "notices.information.sections.bannedTopics.topics.doctrines.title": "Economic and social doctrines", + "notices.information.sections.bannedTopics.topics.doctrines.examples": "e.g. Capitalism, Communism, Socialism, Authoritarianism, Dictatorships, Monarchy, etc.", + "notices.information.sections.bannedTopics.topics.conflicts.title": "Conflicts and war", + "notices.information.sections.bannedTopics.topics.conflicts.examples": "e.g. Syria, Palestine-Israel, Myanmar, Ukraine-Russia, etc.", + "notices.information.sections.bannedTopics.topics.otherTopics.title": "…and any other majorly controversial topics that fast-track people to hate each other.", + "notices.information.sections.bannedTopics.topics.otherTopics.examples": "e.g. Oppression, Genocides, Cults, etc.", + "notices.information.sections.learning.title": "Learning", + "notices.information.sections.learning.buttons.resources": "Open Resources", + "notices.information.sections.learning.buttons.resource": "Add Resource", + "notices.information.sections.socials.buttons.website": "Website", + "notices.information.sections.socials.buttons.discord": "Discord", + "notices.information.sections.socials.buttons.instagram": "Instagram", + "notices.information.sections.socials.buttons.github": "GitHub", + "notices.information.sections.selfServe.title": "Self-serve", + "notices.information.sections.selfServe.buttons.roles": "Select Roles", + "notices.information.sections.selfServe.buttons.suggestion": "Suggest Idea", + "notices.information.sections.selfServe.buttons.report": "Report User", + "notices.information.sections.selfServe.buttons.ticket": "Open Ticket", + "reports.users": "Reported users", + "reports.reason": "Reason for report", + "reports.link": "Link to message", + "reports.noLinkProvided": "No link to message provided.", + "reports.previousInfractions": "Previous infractions of {username}", + "reports.noReports": "There are no unresolved user reports.", + "resources.noResources": "There are no new resource submissions.", + "suggestion.suggestion": "Suggestion", + "suggestions.noSuggestions": "There are no new server suggestions.", + "tickets.noTickets": "There are no open tickets.", + "entryRequests.noEntryRequests": "There are no unresolved requests to enter the server.", + "submittedBy": "Submitted by", + "submittedAt": "Submitted at", + "markResolved": "Mark issue as resolved", + "markUnresolved": "Mark issue as unresolved", + "alreadyMarkedResolved.title": "Already marked resolved", + "alreadyMarkedResolved.description": "This issue has already been marked resolved.", + "alreadyMarkedUnresolved.title": "Already marked unresolved", + "alreadyMarkedUnresolved.description": "This issue has already been marked unresolved.", + "remove": "Remove", + "cannotRemovePrompt.title": "Cannot remove prompt", + "cannotRemovePrompt.description": "You cannot remove this prompt.", + "close": "Close", + "cannotCloseIssue.title": "Cannot close issue", + "cannotCloseIssue.description": "You cannot close this issue.", + "allUpToDate": "All up to date!", + "antiFlood.floodDetectedAndTimedOut.title": "Flood detected", + "antiFlood.floodDetectedAndTimedOut.description": "{user_mention} has been detected to be flooding the server, having posted {messages} in a span of {interval}, and has subsequently been timed out for {duration}.", + "antiFlood.floodDetectedAndTimedOut.description.messages.one": "{one} message", + "antiFlood.floodDetectedAndTimedOut.description.messages.two": "{two} messages", + "antiFlood.floodDetectedAndTimedOut.description.messages.many": "{many} messages" +} \ No newline at end of file diff --git a/source/constants/contexts.ts b/source/constants/contexts.ts index cbe1b9cf3..931525145 100644 --- a/source/constants/contexts.ts +++ b/source/constants/contexts.ts @@ -692,6 +692,49 @@ export default Object.freeze({ guidelines: { title: localise("notices.information.sections.guidelines.title", locale)(), }, + bannedTopics: { + title: localise("notices.information.sections.bannedTopics.title", locale)(), + topics: { + socialIssues: { + title: localise( + "notices.information.sections.bannedTopics.topics.socialIssues.title", + locale, + )(), + examples: localise( + "notices.information.sections.bannedTopics.topics.socialIssues.examples", + locale, + )(), + }, + religions: { + title: localise("notices.information.sections.bannedTopics.topics.religions.title", locale)(), + examples: localise( + "notices.information.sections.bannedTopics.topics.religions.examples", + locale, + )(), + }, + doctrines: { + title: localise("notices.information.sections.bannedTopics.topics.doctrines.title", locale)(), + examples: localise( + "notices.information.sections.bannedTopics.topics.doctrines.examples", + locale, + )(), + }, + conflicts: { + title: localise("notices.information.sections.bannedTopics.topics.conflicts.title", locale)(), + examples: localise( + "notices.information.sections.bannedTopics.topics.conflicts.examples", + locale, + )(), + }, + otherTopics: { + title: localise("notices.information.sections.bannedTopics.topics.otherTopics.title", locale)(), + examples: localise( + "notices.information.sections.bannedTopics.topics.otherTopics.examples", + locale, + )(), + }, + }, + }, learning: { buttons: { resources: localise("notices.information.sections.learning.buttons.resources", locale)(), diff --git a/source/library/services/notices/information.ts b/source/library/services/notices/information.ts index b8a208e7a..dbf3ddeae 100644 --- a/source/library/services/notices/information.ts +++ b/source/library/services/notices/information.ts @@ -150,6 +150,26 @@ class InformationNoticeService extends NoticeService<{ type: "information" }> { type: Discord.MessageComponentTypes.Separator, spacing: Discord.SeparatorSpacingSize.Large, }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: `### 🚫 ${strings.sections.bannedTopics.title}`, + }, + { + type: Discord.MessageComponentTypes.TextDisplay, + content: [ + strings.sections.bannedTopics.topics.socialIssues, + strings.sections.bannedTopics.topics.doctrines, + strings.sections.bannedTopics.topics.religions, + strings.sections.bannedTopics.topics.conflicts, + strings.sections.bannedTopics.topics.otherTopics, + ] + .map((topic) => `- ${topic.title}\n -# ${topic.examples}`) + .join("\n"), + }, + { + type: Discord.MessageComponentTypes.Separator, + spacing: Discord.SeparatorSpacingSize.Large, + }, { type: Discord.MessageComponentTypes.ActionRow, components: [