Skip to content

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

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft

v2 #73

wants to merge 43 commits into from

Conversation

GalvinPython
Copy link
Owner

No description provided.

@GalvinPython GalvinPython added this to the 2.0.0 milestone Mar 1, 2025
@GalvinPython GalvinPython self-assigned this Mar 1, 2025
@GalvinPython GalvinPython moved this to In progress in Feedr Mar 1, 2025
@GalvinPython GalvinPython changed the title v2 v1.5.0 Mar 15, 2025
@GalvinPython GalvinPython changed the title v1.5.0 v2 Apr 26, 2025
@GalvinPython
Copy link
Owner Author

yeah we're back to v2 lol im just doing everything at once

GalvinPython and others added 11 commits April 26, 2025 22:42
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
@GalvinPython GalvinPython requested a review from Copilot May 5, 2025 19:19
Copy link

@Copilot 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, 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:",
Copy link
Preview

Copilot AI May 5, 2025

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.

Suggested change
"Error fetching stream data in checkIfStreamerIsLive:",
"Error fetching stream data in getStreamerId:",

Copilot uses AI. Check for mistakes.

Comment on lines +218 to +219
// Log the autocomplete value
console.log(`Autocomplete value: ${platformUserId}`);
Copy link
Preview

Copilot AI May 5, 2025

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.

Suggested change
// 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.

GalvinPython and others added 2 commits May 5, 2025 20:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GalvinPython GalvinPython added enhancement New feature or request component: site labels May 5, 2025
@GalvinPython GalvinPython linked an issue Jun 29, 2025 that may be closed by this pull request
@GalvinPython GalvinPython linked an issue Jun 29, 2025 that may be closed by this pull request
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

force garbage collector to run Work on a new site
2 participants