-
Notifications
You must be signed in to change notification settings - Fork 0
feat!: v4.5 (beta stage) #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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) => {
There was a problem hiding this 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,@LocalesTdecorators and therun(ctx)method - Swap out direct Discord.js interaction code (
reply,deferReply,EmbedBuilder) for Seyfert’sctx.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
fetchshadows the globalfetchAPI and is misleading; consider renaming it to something likestaticDataorcommonData.
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.authormay not exist onCommandContext; switch toctx.interaction.user.getSchedule().
const schedule = await ctx.author.getSchedule();
src/assets/schema.ts:26
- You changed
timestampChannelfrom 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: [],
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this 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.
| locale == 'en-US' ? | ||
| en[name as keyof typeof en] : | ||
| vi[name as keyof typeof vi] | ||
| }` |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
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.
| 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]; | |
| } | |
| })() | |
| }` |
There was a problem hiding this comment.
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)))]; |
Copilot
AI
Oct 8, 2025
There was a problem hiding this comment.
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.
| 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)]; |
There was a problem hiding this comment.
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
What does this PR do? Seyfert rewrite for Aoki
PR type:
Expected result: Better functionalities (language support, better command structuring)