Conversation
* Fix(lang/help): wrong pronoun used #102 * refactor(crownicles): dedupe data loaders via cachedPromise helper Replace the promise-cache-and-evict boilerplate, copy-pasted across 6 loaders, with a single cachedPromise() helper in data/source.ts. The five single-value loaders (loadNames, loadItemIcons, loadMapTypeIcons, getCrowniclesMapGraph, getContinentGraph) memoize through it; getItems keeps a per-category Map of memoized loaders. Caching, deduplication of concurrent calls and eviction-on-failure now live in one place. Also drops the now-dead module-level promise variables, restores the export accidentally lost on loadItemIcons, and documents the helper. Closes #58 * refactor(crownicles): share the CrowniclesIcons parser between loaders Extract crownicles-icons-source.ts (ICONS_SOURCE_PATH, fetchIconsSource, extractIconBlock) so the item and map-type icon loaders stop each re-implementing the `} = {` split + brace-matching + pair regex. The key pattern is parameterized (\d+ for item ids, default \w+ for map codes), so behaviour is unchanged. Closes #61 * docs: tidy comments and fill JSDoc gaps The codebase was already well-commented, so this is a focused pass: - document computeLeagueBonusScore (as a Crownicles-formula mirror) and CROWNICLES_LEAGUES / CrowniclesLeague - rewrite the terse CrowniclesMap* interface docs and the HelpState path* field comments (incl. the "choosed" typo); drop the redundant `// BFS` marker - add concise JSDoc to ItemCategory, TitleSize, TextInputStyleName, the /mail modal ids, the reminder result types, pathfinderPage and the mail-repository helpers; move the misplaced homePage doc onto the export Closes #79 Closes #80 Closes #81 Closes #82 Closes #83
- Remove the command gate/onGateDenied hook; inline register's "already registered" check without the non-null assertion / TOCTOU - Share the denial-handler wiring between the slash and prefix fronts - Wrap the whole pipeline so a failed denial reply also surfaces through onUnexpectedError instead of being lost - Add owner-only maintenance command (slash + prefix) to drive maintenance mode, which had no runtime toggle - Restrict data to dm scope so the prefix front stops publishing personal GDPR data in public channels - Make bans idempotent and drop the duplicate rank write in banUser - Read a user's language and rank in a single query (getUserProfile) - Remove dead code (safeReply*, delete-data exemption) and unify factory naming, barrel imports, prefix exports and JSDoc
- Add a generic TtlCache: LRU eviction (bounded memory) and a per-entry TTL (stale rows self-heal after out-of-band edits) - Replace the per-field user maps with a single User-row cache so language and rank share one entry and one invalidation - Route the legal-acceptance check through it, caching hits and misses
…110 Rank, RANK, isRank, NotBannedRank, AssignableRank, ASSIGNABLE_RANKS and isAssignableRank were declarative types with no authorization decision attached, but lived in core/permissions/rank.ts and leaked into repositories, context and pipeline layers that only ever used them as plain data - mirroring how SupportedLocale already lives in core/types.ts. Authorization is now an alias of NotBannedRank instead of a duplicate Exclude<Rank, 'banned'>. hasRank stays the only export left in core/permissions/rank.ts, since it is the one function actually used to make an authorization decision.
usecases/ and presentations/ scattered each command's logic across two parallel flat directories, and adding a command meant touching a barrel file in each. Each command now owns a discord/features/<name>/ folder with <name>.service.ts (was usecases/) and <name>.ui.ts (was presentations/); legal/ has no .ui.ts since it reuses register's. commands/slash/ and commands/prefix/ stay flat since the runtime loader discovers commands via a directory scan, not static imports. lang/en/ and lang/fr/ stay in place too, since grouping strings by locale is what you actually want when reviewing translations - but adding a command previously meant editing lang/en/index.ts AND lang/fr/index.ts separately, and forgetting one only fails silently for that locale. lang/packs.ts now lists both locales for a command side by side, so there is exactly one place to touch and no way to add one locale without the other.
French and English disagree on which count is singular - French treats
0 as singular ("0 jour") while English treats it as plural ("0 days") -
so a naive count === 1 check is wrong for French. plural() delegates to
Intl.PluralRules, which already encodes each locale's real CLDR rule.
Not wired into any message yet; ready for the first command that needs
it.
Latency was interpolated as a raw number ("1234ms"), the one spot in the
bot that displays a runtime number to users. formatNumber() delegates
to Intl.NumberFormat so it reads "1,234ms" in English and "1 234ms" in
French, matching each locale's convention.
buildGdprExport went through getUserProfile, whose cache fabricates and stores en/normal for anyone with no User row - fine for permission checks, but wrong for a GDPR disclosure, which must report what is truly stored. findStoredUserProfile reads the row directly, uncached, and returns null instead of a default. GdprExport.language/rank are now nullable; the export shows a single "nothing stored" notice when there is truly nothing (row, legal acceptance, ban hash all absent) - reachable since data is exempt from the legal gate.
/data and c!data take an optional target now, owner-only: a Discord user option on the slash side, a mention/id argument or an interactive UserSelectMenu picker on the prefix side (which has neither). Looking up someone else's data never touches their own 31-day cooldown - it isn't their request. Delivery matches what each path can do: the slash option and the picker's ephemeral component-interaction reply need nothing extra; the mention/id argument goes through the prefix front's existing DM relay, since a plain message reply can't be ephemeral. sendResponseToInteraction now takes any RepliableInteraction instead of just ChatInputCommandInteraction, so the picker can reuse it.
…110 When reduce() called both markHandled() and stop(), neither re-render happened: the inline update() was skipped because the interaction was already handled, and the end handler assumed stop() had already rendered the disabled state, so it skipped too. disabledRendered now tracks whether that render actually reached the message, so the end handler only skips when it's true. Also: unauthorized clicks now go through the collector's own filter instead of being checked inside the 'collect' handler, so they no longer reset the idle timer or count toward the collected items - discord.js only does either for interactions the filter accepts. The refusal reply moves to the 'ignore' event, which fires for whatever the filter rejects.
Let a command response be an ordered list of top-level Components V2 entries (containers, action rows, sections, text, separators) instead of a single container, so a message can mix them in any order. Every fluent component now exposes build(), CommandResponse gains a components list beside the single-container sugar, and the interactive-message runtime renders either shape. Rename EmbedColor to ColorName to match its use as a component accent, not just an embed colour.
Render the "DRING" message as a container (content + owner mention) plus a separate relaunch action row below it, using the new top-level component API. Rename buildReminderTriggeredContainer to buildReminderTriggeredComponents, give the relaunch button its own icon, and let delivery forward whichever shape render returns.
There was a problem hiding this comment.
Pull request overview
This PR is a broad refactor of the Crownutils Discord bot, restructuring the codebase into clearer layers (core domain/repositories vs. Discord presentation), introducing stronger typing (Results, locale/rank types), and modernizing command loading/registries and localized command content.
Changes:
- Introduces new shared utilities (
Result, shared logger exports) and stricter TypeScript compiler options. - Replaces legacy command/event types + registries with a unified registry/types + structural guards and a new client wiring flow.
- Refactors localization into typed
LangNodetrees with side-by-side EN/FR command packs; expands core persistence/models (User/Rank/Reminder) and repositories with new Prisma schema + migrations.
Reviewed changes
Copilot reviewed 248 out of 254 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Enables additional TS strictness flags. |
| src/shared/result.ts | Adds a typed Result helper. |
| src/shared/logger.ts | Refactors logger config usage. |
| src/shared/index.ts | Central re-exports for shared utilities. |
| src/index.ts | Updates startup/shutdown wiring and schedulers. |
| src/discord/utils/errors.ts | Adds error normalization + container helpers. |
| src/discord/utils/constants.ts | Centralizes Discord constants. |
| src/discord/types/event.ts | Removes legacy event interface. |
| src/discord/types/command.ts | Removes legacy command interfaces. |
| src/discord/timestamps.ts | Removes legacy timestamp helper. |
| src/discord/theme/markdown.ts | Improves markdown helpers + docs. |
| src/discord/theme/icons.ts | Centralizes emoji icon set. |
| src/discord/theme/colors.ts | Centralizes named color palette. |
| src/discord/reminders/reminders-command.ts | Removes legacy reminders shared command. |
| src/discord/reminders/remind-command.ts | Removes legacy remind shared command. |
| src/discord/registries/types.ts | Adds new command/event/registry contracts. |
| src/discord/registries/slash-registry.ts | Removes legacy global slash registry. |
| src/discord/registries/prefix-registry.ts | Removes legacy global prefix registry. |
| src/discord/registries/index.ts | Adds registry helpers + Client module augmentation. |
| src/discord/registries/guards.ts | Adds structural module guards for loaders. |
| src/discord/presentations/ping-presentation.ts | Removes legacy ping presentation. |
| src/discord/presentations/maintenance-presentation.ts | Removes legacy maintenance presentation. |
| src/discord/presentations/invite-presentation.ts | Removes legacy invite presentation. |
| src/discord/presentations/grade-presentation.ts | Removes legacy grade presentation. |
| src/discord/presentations/delete-data-presentation.ts | Removes legacy delete-data flow presentation. |
| src/discord/presentations/crownicles-help/pages/witch.ts | Removes legacy help page. |
| src/discord/presentations/crownicles-help/pages/rage.ts | Removes legacy help page. |
| src/discord/presentations/crownicles-help/pages/pets.ts | Removes legacy help page. |
| src/discord/presentations/crownicles-help/pages/index.ts | Removes legacy help page registry. |
| src/discord/presentations/crownicles-help/pages/home.ts | Removes legacy help page. |
| src/discord/presentations/crownicles-help/pages/events.ts | Removes legacy help page. |
| src/discord/presentations/crownicles-help/page.ts | Removes legacy help page types. |
| src/discord/presentations/crownicles-help/nav.ts | Removes legacy help navigation. |
| src/discord/presentations/crownicles-help/index.ts | Removes legacy help exports. |
| src/discord/presentations/crownicles-help/icons.ts | Removes legacy help icon set. |
| src/discord/presentations/about-presentation.ts | Removes legacy about presentation. |
| src/discord/pipeline/denial-handlers.ts | Adds centralized denial/error reply wiring. |
| src/discord/mails/unread-reminder.ts | Removes legacy unread mail reminder. |
| src/discord/mails/expiry-scheduler.ts | Removes legacy mail expiry scheduler. |
| src/discord/legal/legal-command.ts | Removes legacy legal command service. |
| src/discord/legal/data-command.ts | Removes legacy data command service. |
| src/discord/lang/types.ts | Refactors locale pack typing model. |
| src/discord/lang/reminders.ts | Removes legacy reminders lang node. |
| src/discord/lang/remind.ts | Removes legacy remind lang node. |
| src/discord/lang/plural.ts | Adds pluralization helper. |
| src/discord/lang/ping.ts | Removes legacy ping lang node. |
| src/discord/lang/permissions.ts | Removes legacy permissions labels. |
| src/discord/lang/packs.ts | Adds unified EN/FR command pack registry. |
| src/discord/lang/number.ts | Adds locale number formatting helper. |
| src/discord/lang/maintenance.ts | Removes legacy maintenance lang node. |
| src/discord/lang/mail.ts | Removes legacy mail/mails lang nodes. |
| src/discord/lang/invite.ts | Removes legacy invite lang node. |
| src/discord/lang/index.ts | Switches to lang.en / lang.fr trees. |
| src/discord/lang/help.ts | Removes legacy help lang node. |
| src/discord/lang/grade.ts | Removes legacy grade lang node. |
| src/discord/lang/fr/set-rank.ts | Adds FR set-rank strings. |
| src/discord/lang/fr/reminders.ts | Adds FR reminders strings. |
| src/discord/lang/fr/remind.ts | Adds FR remind strings. |
| src/discord/lang/fr/register.ts | Adds FR register strings. |
| src/discord/lang/fr/rank.ts | Adds FR rank strings. |
| src/discord/lang/fr/ping.ts | Adds FR ping strings. |
| src/discord/lang/fr/maintenance.ts | Adds FR maintenance strings. |
| src/discord/lang/fr/language.ts | Adds FR language strings. |
| src/discord/lang/fr/data.ts | Adds FR data strings. |
| src/discord/lang/fr/common.ts | Adds FR common strings. |
| src/discord/lang/fr/about.ts | Updates FR about strings to new typing. |
| src/discord/lang/errors.ts | Removes legacy errors helpers. |
| src/discord/lang/en/set-rank.ts | Adds EN set-rank strings. |
| src/discord/lang/en/reminders.ts | Adds EN reminders strings. |
| src/discord/lang/en/remind.ts | Adds EN remind strings. |
| src/discord/lang/en/register.ts | Adds EN register strings. |
| src/discord/lang/en/rank.ts | Adds EN rank strings. |
| src/discord/lang/en/ping.ts | Adds EN ping strings. |
| src/discord/lang/en/maintenance.ts | Adds EN maintenance strings. |
| src/discord/lang/en/language.ts | Adds EN language strings. |
| src/discord/lang/en/data.ts | Adds EN data strings. |
| src/discord/lang/en/common.ts | Adds EN common strings. |
| src/discord/lang/en/about.ts | Adds EN about strings. |
| src/discord/lang/delete-data.ts | Removes legacy delete-data lang node. |
| src/discord/lang/data.ts | Removes legacy data lang node. |
| src/discord/interactions/safe-discord.ts | Adds best-effort Discord call wrapper. |
| src/discord/interactions/reply.ts | Removes legacy reply-and-fetch helper. |
| src/discord/interactions/reminder-list.ts | Removes legacy reminder list collector. |
| src/discord/interactions/reminder-cancel.ts | Removes legacy reminder cancel collector. |
| src/discord/interactions/index.ts | New interactions public surface exports. |
| src/discord/interactions/help-select.ts | Removes legacy help select collector. |
| src/discord/icons.ts | Removes legacy icon set. |
| src/discord/handlers/slash-handler.ts | Updates slash loader to return commands. |
| src/discord/handlers/prefix-handler.ts | Updates prefix loader to return commands. |
| src/discord/handlers/index.ts | Adds handler re-export barrel. |
| src/discord/handlers/event-handler.ts | Updates event loader to return modules. |
| src/discord/handlers/command-pipeline.ts | Removes legacy pipeline implementation. |
| src/discord/features/set-rank/set-rank.ui.ts | Adds set-rank UI builder. |
| src/discord/features/set-rank/set-rank.service.ts | Adds set-rank domain service. |
| src/discord/features/reminder/reminder.duration.ts | Adds reminder duration parsing/constants. |
| src/discord/features/rank/rank.ui.ts | Adds rank UI builder. |
| src/discord/features/rank/rank.service.ts | Adds rank domain service. |
| src/discord/features/ping/ping.ui.ts | Adds ping UI builder. |
| src/discord/features/ping/ping.service.ts | Adds ping domain service. |
| src/discord/features/maintenance/maintenance.ui.ts | Adds maintenance UI builder. |
| src/discord/features/maintenance/maintenance.service.ts | Adds maintenance domain service. |
| src/discord/features/legal/legal.service.ts | Adds interactive legal viewer controller. |
| src/discord/features/language/language.ui.ts | Adds language picker UI builder. |
| src/discord/features/language/language.service.ts | Adds interactive language controller. |
| src/discord/features/about/about.ui.ts | Adds about UI builder (uses config). |
| src/discord/features/about/about.service.ts | Adds about response service. |
| src/discord/events/client-ready.ts | Refactors ready event + reminder scheduler start. |
| src/discord/errors.ts | Removes legacy error helpers. |
| src/discord/custom-id.ts | Removes legacy custom-id helper. |
| src/discord/context/user.ts | Adds user context resolver (rank+locale). |
| src/discord/context/locale.ts | Adds locale resolver helper. |
| src/discord/constants.ts | Removes legacy command prefix constant. |
| src/discord/components/title.ts | Removes legacy Title component. |
| src/discord/components/text-input.ts | Removes legacy text input wrapper. |
| src/discord/components/separator.ts | Refactors separator wrapper API. |
| src/discord/components/section.ts | Refactors section wrapper API. |
| src/discord/components/index.ts | Reworks components exports/enums surface. |
| src/discord/components/container.ts | Refactors container builder + palette usage. |
| src/discord/components/component.ts | Redesigns component attachment interfaces. |
| src/discord/components/code-block.ts | Removes legacy CodeBlock component. |
| src/discord/components/button.ts | Refactors button wrapper + adds link helper. |
| src/discord/components/action-row.ts | Adds typed action row wrappers. |
| src/discord/commands/slash/set-rank.ts | Adds slash set-rank command module. |
| src/discord/commands/slash/reminders.ts | Refactors slash reminders to new controller flow. |
| src/discord/commands/slash/register.ts | Adds slash register command module. |
| src/discord/commands/slash/rank.ts | Adds slash rank command module. |
| src/discord/commands/slash/ping.ts | Refactors slash ping to new service/response path. |
| src/discord/commands/slash/maintenance.ts | Refactors maintenance to option-based toggle. |
| src/discord/commands/slash/mails.ts | Removes legacy mails command. |
| src/discord/commands/slash/mail.ts | Removes legacy mail command. |
| src/discord/commands/slash/legal.ts | Refactors legal to interactive controller. |
| src/discord/commands/slash/language.ts | Adds slash language command module. |
| src/discord/commands/slash/invite.ts | Removes legacy invite command. |
| src/discord/commands/slash/help.ts | Removes legacy help command. |
| src/discord/commands/slash/grade.ts | Removes legacy grade command. |
| src/discord/commands/slash/delete-data.ts | Removes legacy delete-data command. |
| src/discord/commands/slash/data.ts | Refactors data to new service + owner lookup. |
| src/discord/commands/slash/crownicles-help.ts | Removes legacy crownicles-help command. |
| src/discord/commands/slash/about.ts | Refactors about to new service/response path. |
| src/discord/commands/prefix/reminders.ts | Refactors prefix reminders to new controller flow. |
| src/discord/commands/prefix/remind.ts | Refactors prefix remind to new reminder service. |
| src/discord/commands/prefix/register.ts | Adds prefix register command module. |
| src/discord/commands/prefix/rank.ts | Adds prefix rank command module. |
| src/discord/commands/prefix/ping.ts | Refactors prefix ping to new response path. |
| src/discord/commands/prefix/maintenance.ts | Adds prefix maintenance command module. |
| src/discord/commands/prefix/mails.ts | Removes legacy mails command. |
| src/discord/commands/prefix/legal.ts | Refactors prefix legal to controller flow. |
| src/discord/commands/prefix/language.ts | Adds prefix language command module. |
| src/discord/commands/prefix/invite.ts | Removes legacy invite command. |
| src/discord/commands/prefix/help.ts | Removes legacy help command. |
| src/discord/commands/prefix/grade.ts | Removes legacy grade command. |
| src/discord/commands/prefix/delete-data.ts | Removes legacy delete-data command. |
| src/discord/commands/prefix/data.ts | Refactors prefix data incl. DM relay + lookup. |
| src/discord/commands/prefix/crownicles-help.ts | Removes legacy crownicles-help command. |
| src/discord/commands/prefix/about.ts | Refactors prefix about to new service path. |
| src/discord/client/index.ts | Replaces client wiring + registries initialization. |
| src/discord/client/crownutils-client.ts | Removes legacy client implementation. |
| src/core/types.ts | Adds shared locale/rank/reminder status types. |
| src/core/time/index.ts | Removes legacy time helpers. |
| src/core/security/hash-user-id.ts | Adds salted user-id hashing helper. |
| src/core/repositories/maintenance-repository.ts | Adds cached maintenance persistence. |
| src/core/repositories/legal-repository.ts | Adds TTL-cached legal acceptance repo. |
| src/core/repositories/index.ts | Adds repositories barrel exports. |
| src/core/repositories/banned-repository.ts | Adds ban persistence keyed by hash. |
| src/core/reminders/reminder-validation.ts | Removes legacy reminder validation. |
| src/core/reminders/reminder-scheduler.ts | Removes legacy reminder scheduler. |
| src/core/reminders/reminder-repository.ts | Removes legacy reminder repository. |
| src/core/persistence/client.ts | Updates Prisma client path + config usage. |
| src/core/permissions/user.ts | Adds isOwner helper based on config. |
| src/core/permissions/types.ts | Removes legacy permission types. |
| src/core/permissions/scope.ts | Refactors scope model and checks. |
| src/core/permissions/requirements.ts | Adds Result-based requirements checker. |
| src/core/permissions/rank.ts | Adds rank comparison helper. |
| src/core/permissions/index.ts | Refactors exports to new permission model. |
| src/core/permissions/engine.ts | Removes legacy permission engine. |
| src/core/permissions/authorization.ts | Refactors authorization to rank-based checks. |
| src/core/legal/legal-repository.ts | Removes legacy legal repository. |
| src/core/crownicles/pathfinder-usage.ts | Removes legacy pathfinder usage tracking. |
| src/core/crownicles/index.ts | Removes legacy crownicles export surface. |
| src/core/crownicles/data/source.ts | Removes legacy runtime Crownicles fetchers. |
| src/core/crownicles/data/map-icons.ts | Removes legacy map icon loader. |
| src/core/crownicles/data/item-icons.ts | Removes legacy item icon loader. |
| src/core/crownicles/data/index.ts | Removes legacy crownicles data barrel. |
| src/core/crownicles/config/leagues.ts | Removes legacy league configuration. |
| src/core/crownicles/calculators/pathfinding.ts | Removes legacy pathfinding calculator. |
| src/core/crownicles/calculators/leagues.ts | Removes legacy league bonus calculator. |
| src/core/crownicles/calculators/items.ts | Removes legacy item stat calculator. |
| src/core/cache/ttl-cache.ts | Adds bounded TTL cache utility. |
| prisma/schema.prisma | Updates data model (User/Rank/Reminder v2). |
| prisma/migrations/20260712085233_add_reminder_duration/migration.sql | Adds reminder duration migration. |
| prisma/migrations/20260711081949_add_reminder/migration.sql | Adds reminder table migration. |
| prisma/migrations/20260707002548_rename_pseudoid_to_hash/migration.sql | Renames identifiers to hashed keys. |
| prisma/migrations/20260707002319_add_gdpr_request/migration.sql | Adds GDPR request tracking. |
| prisma/migrations/20260706130952_model_banned/migration.sql | Adds ban model and user reshape. |
| prisma/migrations/20260706121858_add_rank/migration.sql | Adds rank to user table. |
| prisma/migrations/20260704215345_add_legal_acceptance/migration.sql | Adds legal acceptance persistence. |
| prisma/migrations/20260704214918_init/migration.sql | Initializes core tables. |
| prisma/migrations/20260622152625_add_mails/migration.sql | Removes legacy mail schema migration. |
| prisma/migrations/20260621232719_add_pathfinder_usage/migration.sql | Removes legacy pathfinder migration. |
| prisma/migrations/20260613023129_add_bot_state/migration.sql | Removes legacy bot-state migration. |
| prisma/migrations/20260606203058_init/migration.sql | Removes legacy initial reminder migration. |
| pnpm-workspace.yaml | Updates allowed build deps list. |
| package.json | Updates scripts, metadata, Node engine. |
| eslint.config.mjs | Tightens lint rules + enforces layer boundaries. |
| .prettierrc | Tweaks prettier formatting settings. |
| .prettierignore | Updates ignored paths (incl. generated). |
| .node-version | Keeps Node version pinned. |
| .gitignore | Updates env/generation ignore patterns. |
| .env.example | Updates required env var names. |
| .editorconfig | Adds charset + MD whitespace rule. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * so each pack keeps its precise literal type while the invariant "no leaf is | ||
| * anything but a string or a string formatter" is enforced at compile time. | ||
| */ | ||
| export type LangLeaf = string | ((...args: never[]) => string); |
Comment on lines
+37
to
+40
| public link(url: string): this { | ||
| this.builder.setStyle(ButtonStyle.Link).setURL(url); | ||
| return this; | ||
| } |
| "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "deliveredAt" DATETIME | ||
| ); | ||
| INSERT INTO "new_Reminder" ("attempts", "channelId", "content", "createdAt", "deliveredAt", "dueAt", "id", "lastError", "status", "userId") SELECT "attempts", "channelId", "content", "createdAt", "deliveredAt", "dueAt", "id", "lastError", "status", "userId" FROM "Reminder"; |
Comment on lines
24
to
+28
| const before = Date.now(); | ||
| await interaction.deferReply(); | ||
| const totalMs = Date.now() - before; | ||
| const discordMs = Math.round(interaction.client.ws.ping); | ||
|
|
||
| await interaction.editReply( | ||
| buildPingResultContainer(totalMs, discordMs).build(), | ||
| const totalLatencyMs = Date.now() - before; | ||
| const discordLatencyMs = Math.round(interaction.client.ws.ping); | ||
| await sendResponseToInteraction( |
Comment on lines
+6
to
+10
| description: 'Shows informations about the bot.', | ||
| messages: { | ||
| title: `${icons.info} Bot's informations`, | ||
| version: (botVersion: string): string => | ||
| `Current version : ${md.bold(botVersion)}`, |
Comment on lines
+14
to
+17
| licenseName: (license: string) => `License : ${md.bold(license)}`, | ||
| compatibilityWithCrownicles: | ||
| "The compatibilty notice witb Crownicle's license is available on the official repository.", | ||
| }, |
Comment on lines
+18
to
+20
| cannotRegister: | ||
| 'Vous avez été banni de manière permanente, vous ne pouvez pas vous enregister sur le bot.', | ||
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.