-
Notifications
You must be signed in to change notification settings - Fork 1
v2 #73
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
base: main
Are you sure you want to change the base?
v2 #73
Conversation
…eply function lol its deprecated
…l` in reply function lol its deprecated
yeah we're back to v2 lol im just doing everything at once |
Bumps [cron](https://github.com/kelektiv/node-cron) from 3.5.0 to 4.3.0. - [Release notes](https://github.com/kelektiv/node-cron/releases) - [Changelog](https://github.com/kelektiv/node-cron/blob/main/CHANGELOG.md) - [Commits](kelektiv/node-cron@v3.5.0...v4.3.0) --- updated-dependencies: - dependency-name: cron dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
yeah this was a test commit for something :p
…/cron-4.3.0 build(deps): bump cron from 3.5.0 to 4.3.0
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, titled "v2", updates the project to use PostgreSQL instead of SQLite, refactors multiple utility modules for better formatting and updated error handling, and modernizes the Discord command code with v14 improvements. Key changes include switching to Postgres in the database layer, modifying API calls and error messages in YouTube and Twitch utilities, and updating command definitions and configurations.
Reviewed Changes
Copilot reviewed 26 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/utils/youtube/getChannelDetails.ts | Code formatting improvements and cleanup of informal comments. |
src/utils/youtube/fetchLatestUploads.ts | Adjusted formatting, error logging, and indentation. |
src/utils/youtube/checkIfChannelIdIsValid.ts | Minor formatting improvements (semicolon additions). |
src/utils/twitch/getStreamerName.ts | Consistent formatting and semicolon additions. |
src/utils/twitch/getStreamerId.ts | Updated formatting but contains an inaccurate error message. |
src/utils/migratedb.ts | Migration script updated for Postgres along with added logging. |
src/utils/logging.ts | File removed, presumably as part of refactoring. |
src/utils/db/youtube.ts | New helper for fetching YouTube tracking information. |
src/utils/db/init.ts | Updated table creation scripts for new database schema. |
src/utils/database.ts | Overhauled to use a PostgreSQL pool, removing legacy SQLite code. |
src/index.ts | Refactored imports and initialization logic including cron jobs. |
src/events/ready.ts | Temporarily disabled live streamer checks via commented code. |
src/config.ts | Improved configuration and environment variable management. |
src/commands.ts | Updated command definitions with Discord.js v14 patterns and flags. |
.github/dependabot.yml | Changed package ecosystem from npm to bun. |
Files not reviewed (5)
- .env.example: Language not supported
- .gitattributes: Language not supported
- .github/workflows/lockb.yml: Language not supported
- new.dbml: Language not supported
- package.json: Language not supported
Comments suppressed due to low confidence (1)
src/utils/youtube/getChannelDetails.ts:20
- [nitpick] Consider removing informal language (e.g., 'lol') from comments to maintain a professional codebase.
// If channel exists lol
if (!res.ok) { | ||
console.error( | ||
"Error fetching stream data in checkIfStreamerIsLive:", |
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 error message references 'checkIfStreamerIsLive' instead of 'getStreamerId'. Please update the message to accurately reflect the function's purpose.
"Error fetching stream data in checkIfStreamerIsLive:", | |
"Error fetching stream data in getStreamerId:", |
Copilot uses AI. Check for mistakes.
// Log the autocomplete value | ||
console.log(`Autocomplete value: ${platformUserId}`); |
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.
[nitpick] Consider removing or guarding debug logs in production to avoid exposing sensitive user input.
// Log the autocomplete value | |
console.log(`Autocomplete value: ${platformUserId}`); | |
// Log the autocomplete value (only in non-production environments) | |
if (process.env.NODE_ENV !== "production") { | |
console.log(`Autocomplete value: ${platformUserId}`); | |
} |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
removed sqlite backups lol
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
yeah my solution is terrible but i love it
No description provided.