v1.3 Here we go! - #129
Merged
Merged
Conversation
QoL and has been on the todo for a while.
Moved logging to its own function (sendLog) as we now also log when it gets disabled.
Including, administrator & manage guild permission.
Excluding: - Leave - Ban (still changed moderator) - Unban (still changed moderator) - Kick (still changed moderator)
Excluding ephemeral commands obviously.
Formatted some files that I forgot to format last time.
…is deleted don't repost
There was a problem hiding this comment.
Pull request overview
This PR updates the monorepo’s dependency constraints and expands QuestBot moderation/logging capabilities, including server-wide lockdown controls, improved starboard cleanup behavior, and richer audit-style logging.
Changes:
- Added pnpm overrides (fast-uri) and refreshed lockfile/resolved dependency versions.
- Introduced server/channel lockdown support (DB fields + bot library + slash commands).
- Enhanced logging and moderation utilities (settings change logging, sticky logging, starboard cleanup hooks, and log embed author/moderator formatting).
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds workspace-level overrides and release-age setting. |
| pnpm-lock.yaml | Persists overrides and bumps multiple resolved dependency versions. |
| packages/database/prisma/schema.prisma | Adds locked/lockedDown state fields for new lockdown features. |
| biome.json | Updates Biome schema reference. |
| apps/dash/vite.config.ts | Uses import.meta.dirname for ESM-friendly path resolution. |
| apps/bot/src/listeners/stickyCommand.ts | New listener to repost stickies for successful chat input commands. |
| apps/bot/src/listeners/messageUpdate.ts | Avoids logging bot-authored edits; improves author field formatting. |
| apps/bot/src/listeners/messageDeleteBulk.ts | Removes related starboard posts for bulk deletions. |
| apps/bot/src/listeners/messageDelete.ts | Removes related starboard posts for single deletions; changes author formatting. |
| apps/bot/src/listeners/messageCreate.ts | Adds automod exemptions for admins/ManageGuild. |
| apps/bot/src/listeners/guildMemberUpdate.ts | Adjusts timeout log formatting (mentions). |
| apps/bot/src/listeners/guildMemberRemove.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/listeners/guildBanAdd.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/listeners/emojiUpdate.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/listeners/emojiDelete.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/listeners/emojiCreate.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/listeners/channelDelete.ts | Updates starboard cleanup behavior on channel deletion; adjusts moderator formatting. |
| apps/bot/src/listeners/channelCreate.ts | Adjusts moderator formatting (mentions). |
| apps/bot/src/lib/starboard.ts | Adds privacy guard + robust post purging APIs; improves fetch error handling. |
| apps/bot/src/lib/settings.ts | Adds SETTING_LABELS metadata for structured settings-change logs. |
| apps/bot/src/lib/logging.ts | Adds structured settings-change logging and refactors log sending. |
| apps/bot/src/lib/lockdown.ts | New lockdown/unlock implementation storing state in DB + managing permissions. |
| apps/bot/src/lib/honeypot.ts | Tweaks embed/button presentation for honeypot channel. |
| apps/bot/src/commands/utility/suggest.ts | Adds cooldown and a comment. |
| apps/bot/src/commands/utility/setup.ts | Routes settings updates through logging-aware helper. |
| apps/bot/src/commands/utility/settings.ts | Logs settings changes on interactive updates. |
| apps/bot/src/commands/moderation/sticky.ts | Logs sticky set/remove actions to logging channel. |
| apps/bot/src/commands/moderation/lockdown/unlockdown.ts | Adds /unlockdown command. |
| apps/bot/src/commands/moderation/lockdown/lockdown.ts | Adds /lockdown command. |
| apps/bot/package.json | Bumps undici range to match lockfile resolution. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
apps/bot/src/lib/lockdown.ts:52
- Editing channel permission overwrites requires
ManageChannels(orAdministrator), notManageRoles. As written, the bot may skip channels it can lock, or attempt to lock and then fail despite this guard. UseManageChannelsfor the permission check.
if (!channel.isSendable() || !channel.permissionsFor(me).has(PermissionFlagsBits.ManageRoles)) {
skipped++;
continue;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+18
to
+23
| async function sendLog(guild: Guild, channelId: string, embed: EmbedBuilder) { | ||
| const channel = await guild.channels.fetch(channelId).catch(() => null); | ||
| if (!channel?.isTextBased() || !channel.isSendable()) return; | ||
|
|
||
| await channel.send({ embeds: [embed] }).catch((err) => console.error(err)); | ||
| } |
Comment on lines
+46
to
+48
| if (!everyonePerms.has(PermissionFlagsBits.ViewChannel)) continue; | ||
| if (!everyonePerms.has(PermissionFlagsBits.SendMessages)) continue; | ||
| if (!everyonePerms.has(PermissionFlagsBits.SendMessagesInThreads)) continue; |
Comment on lines
+17
to
+19
| // discord fires this event for ephemeral commands, don't repost if so | ||
| if (interaction.ephemeral !== false) return; | ||
|
|
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.