Skip to content

Conversation

@buttermiilk
Copy link
Collaborator

What does this PR do? Seyfert rewrite for Aoki

PR type:

  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed.)
  • Code changes have been partially tested locally.
  • Note: Use this branch with extreme caution.

Expected result: Better functionalities (language support, better command structuring)

@buttermiilk buttermiilk requested a review from Copilot May 14, 2025 11:17
@buttermiilk buttermiilk added enhancement New feature or request new version New version of the project roadmap Planned implementations labels May 14, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces version 4.5 (alpha stage) with a complete rewrite of several command modules to integrate the new Seyfert framework and update the command handling logic. Key changes include replacing legacy Discord command handling with Seyfert decorators and options, restructuring subcommands across various modules (anime, fun, etc.), and updating build and configuration files to support Bun.

Reviewed Changes

Copilot reviewed 125 out of 125 changed files in this pull request and generated 3 comments.

File Description
src/cmd/** Updated command files with new Seyfert decorators and methods
src/build.ts Switched build configuration from esbuild to Bun
seyfert.config.ts, package.json Updated configuration and dependency versions
README.md, INSTRUCTIONS.md Documentation revised to describe the new implementation
Comments suppressed due to low confidence (1)

src/cmd/anime/airing.ts:66

  • [nitpick] The variable name 'pages' is used to store embed objects, which may be misleading. Consider renaming it to 'embeds' for improved clarity.
const pages = res.data.map((data: any, index: number) => {

@buttermiilk buttermiilk mentioned this pull request May 14, 2025
@buttermiilk buttermiilk requested a review from Copilot May 18, 2025 10:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR rewrites the bot commands to use the Seyfert framework, replacing the old custom handlers and Discord.js calls with Seyfert decorators, CommandContext, and built-in utilities. It also updates project configuration, dependencies, and accompanying documentation to match the new structure.

  • Refactor each command to use @Declare, @Options, @LocalesT decorators and the run(ctx) method
  • Swap out direct Discord.js interaction code (reply, deferReply, EmbedBuilder) for Seyfert’s ctx.write, ctx.deferReply, Embed, etc.
  • Update configuration (seyfert.config.ts, package.json), remove the old build script, and amend docs (README.md, INSTRUCTIONS.md) to reflect Seyfert usage

Reviewed Changes

Copilot reviewed 130 out of 130 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/cmd/fun/advice.ts Rename fetch logic to use static profane data via ctx.client.utils.profane
src/cmd/fun/8ball.ts Migrate 8ball subcommand to Seyfert API (@Declare, Options, run)
src/cmd/anime/search.ts Port anime search to Seyfert, update autocomplete and embed rendering
src/cmd/anime/schedule/*.ts Implement schedule add/current/remove as subcommands under @Group('schedule')
src/cmd/anime/random.ts Rewrite random command to use Seyfert decorators and context utilities
src/cmd/anime/quote.ts Convert quote command to use run(ctx) and localized error messages
src/cmd/anime/profile.ts Refactor profile command with typed options, localized errors, and embeds
src/cmd/anime/index.ts Define Anime master command with subcommands and subcommand groups
src/cmd/anime/gelbooru.ts Port gelbooru command to Seyfert, add options, NSFW check, and pagination
src/cmd/anime/airing.ts Rewrite airing schedule command with autocomplete, pagination via Pagination
src/cmd/anime/action.ts Migrate action image command to Seyfert, with choices and localized embed
src/build.ts Removed old esbuild script
src/assets/schema.ts Update default schema (language, timestampChannel, color type)
seyfert.config.ts Add Seyfert configuration for commands, events, and locales
package.json Bump version to 4.5.0, drop Discord.js and other deps in favor of Seyfert
README.md Revise documentation to describe Seyfert porting and branch purpose
INSTRUCTIONS.md Update contributor guide for Seyfert commands, options, and extenders
.env.example Add new environment variables and remove unused ones
Comments suppressed due to low confidence (3)

src/cmd/fun/advice.ts:14

  • [nitpick] The variable name fetch shadows the global fetch API and is misleading; consider renaming it to something like staticData or commonData.
const fetch = await ctx.client.utils.profane.getStatic(

src/cmd/anime/schedule/current.ts:24

  • Inconsistent API – other commands use ctx.interaction.user.getSchedule(). ctx.author may not exist on CommandContext; switch to ctx.interaction.user.getSchedule().
const schedule = await ctx.author.getSchedule();

src/assets/schema.ts:26

  • You changed timestampChannel from a string to an array by default; ensure any code that reads this field handles an array instead of a string to avoid runtime errors.
timestampChannel: [],

buttermiilk and others added 2 commits May 18, 2025 17:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@buttermiilk buttermiilk linked an issue May 18, 2025 that may be closed by this pull request
@buttermiilk buttermiilk requested a review from Copilot October 8, 2025 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 126 out of 134 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

src/cmd/verify/customize.ts:1

  • Using @ts-ignore suppresses type checking. Consider properly typing this property or using a union type that TypeScript can understand.
import { meta } from "@assets/cmdMeta";

src/cmd/verify/customize.ts:1

  • Another @ts-ignore usage that should be addressed with proper typing instead of suppressing type checking.
import { meta } from "@assets/cmdMeta";

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +75 to +78
locale == 'en-US' ?
en[name as keyof typeof en] :
vi[name as keyof typeof vi]
}`
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ternary operator formatting is inconsistent. Consider aligning the conditional expressions or using a more readable if-else structure.

Suggested change
locale == 'en-US' ?
en[name as keyof typeof en] :
vi[name as keyof typeof vi]
}`
(() => {
if (locale === 'en-US') {
return en[name as keyof typeof en];
} else {
return vi[name as keyof typeof vi];
}
})()
}`

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you not

const watched = Array.from(new Set(schedules.map(s => Number(s.anilistid))));
const episode = Array.from(new Set(schedules.map(s => Number(s.nextep))));
const watched = [...new Set(schedules.map(s => Number(s.anilistId)).filter(id => typeof id === 'number' && !isNaN(id)))];
const episode = [...new Set(schedules.map(s => Number(s.nextEp)).filter(ep => typeof ep === 'number' && !isNaN(ep)))];
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are very long and complex. Consider breaking them down into multiple steps for better readability.

Suggested change
const episode = [...new Set(schedules.map(s => Number(s.nextEp)).filter(ep => typeof ep === 'number' && !isNaN(ep)))];
const nextEpNumbers = schedules.map(s => Number(s.nextEp));
const validNextEpNumbers = nextEpNumbers.filter(ep => typeof ep === 'number' && !isNaN(ep));
const episode = [...new Set(validNextEpNumbers)];

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry no not this time

@buttermiilk buttermiilk linked an issue Oct 8, 2025 that may be closed by this pull request
@buttermiilk buttermiilk changed the title feat!: v4.5 (alpha stage) feat!: v4.5 (beta stage) Oct 8, 2025
@buttermiilk buttermiilk merged commit eaf30a0 into main Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new version New version of the project roadmap Planned implementations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Q4/2025 Roadmap Q2/2025 Roadmap

2 participants