Skip to content
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
103 changes: 57 additions & 46 deletions assets/localisations/services/en-GB.json
Original file line number Diff line number Diff line change
@@ -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"
}
43 changes: 43 additions & 0 deletions source/constants/contexts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)(),
Expand Down
4 changes: 2 additions & 2 deletions source/constants/emojis/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default Object.freeze({
kicked: "🚪",
},
message: {
updated: "⬆️",
deleted: "❌",
updated: "🔄",
deleted: "🗑️",
},
entryRequest: {
submitted: "ℹ️",
Expand Down
2 changes: 1 addition & 1 deletion source/library/models/documents/report.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
interface ReportFormData {
reason: string;
users: string;
messageLink?: string;
messageLink: string;
}

interface ReportDocument {
Expand Down
20 changes: 20 additions & 0 deletions source/library/services/notices/information.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
14 changes: 10 additions & 4 deletions source/library/stores/journalling/discord/guild-ban-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) })}`,
},
],
},
],
};
Expand Down
14 changes: 10 additions & 4 deletions source/library/stores/journalling/discord/guild-ban-remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) })}`,
},
],
},
],
};
Expand Down
14 changes: 10 additions & 4 deletions source/library/stores/journalling/discord/guild-member-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) })}`,
},
],
},
],
};
Expand Down
14 changes: 10 additions & 4 deletions source/library/stores/journalling/discord/guild-member-remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) })}`,
},
],
},
],
};
Expand Down
24 changes: 15 additions & 9 deletions source/library/stores/journalling/discord/message-delete-bulk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
37 changes: 21 additions & 16 deletions source/library/stores/journalling/discord/message-delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading