Skip to content
Draft

v2 #73

Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
28f6201
hai im doing something
GalvinPython Jan 26, 2025
5b553c3
chore: lint + update dependabot flow for bun
GalvinPython Feb 3, 2025
dcea4b7
chore: replace phemeral: true with lags: MessageFlags.Ephemeral in …
GalvinPython Feb 3, 2025
5a404fe
chore: replace ` ephemeral: true` with ` flags: MessageFlags.Ephemer…
GalvinPython Feb 3, 2025
59bd0a7
Merge branch 'dev' of https://github.com/GalvinPython/feedr into dev
GalvinPython Feb 3, 2025
f4fdf2e
welcome back pg
GalvinPython Apr 25, 2025
1c47b7c
added new env stuff
GalvinPython Apr 26, 2025
fc0b5d3
added pg pool
GalvinPython Apr 27, 2025
1238937
deps: update discord.js
GalvinPython Apr 27, 2025
d5ed05b
more changes
GalvinPython Apr 27, 2025
232f94c
build(deps): bump cron from 3.5.0 to 4.3.0
dependabot[bot] Apr 28, 2025
3c7839f
update package data
GalvinPython Apr 28, 2025
e0ab312
Merge pull request #105 from GalvinPython/dependabot/npm_and_yarn/dev…
GalvinPython Apr 28, 2025
84d90c7
chore: update bun.lock
GalvinPython Apr 28, 2025
ba95662
chore(database): migrate initTables to seperate file
GalvinPython Apr 28, 2025
7c68c4c
migrate db
GalvinPython Apr 29, 2025
bb1feb7
start of site
GalvinPython May 5, 2025
8bac0d0
Update web/src/components/ScrollUpButton.tsx
GalvinPython May 5, 2025
599f364
Update web/src/components/Hero.tsx
GalvinPython May 5, 2025
c777cc3
feat: api
GalvinPython May 6, 2025
b33d985
chore(deps): remove express
GalvinPython May 6, 2025
16ccb02
update .gitignore to be on par with "feat/site"
GalvinPython May 6, 2025
4b19414
db: migrate bot_info to new system
GalvinPython May 6, 2025
fc26d22
chore(web): change favicon
GalvinPython May 9, 2025
e1348be
feat(web): add tos page
GalvinPython May 9, 2025
6458eb5
feat(web): add privacy and 404 page
GalvinPython May 18, 2025
540625f
chore(bot): continue db migration
GalvinPython May 18, 2025
6db12aa
i forgot what my code does
GalvinPython Jun 23, 2025
c7b0597
ref: code clean up + comments
GalvinPython Jun 23, 2025
b4980b0
feat(latest-uploads): split update function
ToastedDev Jun 23, 2025
8a73bf5
chore: cleanup
ToastedDev Jun 23, 2025
8ca3c5e
Merge branch 'GalvinPython:dev' into dev
ToastedDev Jun 23, 2025
397508e
Update src/utils/youtube/sendLatestUploads.ts
GalvinPython Jun 23, 2025
411c998
Merge pull request #134 from ToastedDev/dev
GalvinPython Jun 23, 2025
522c316
feat(commands): better errors for `/track`
ToastedDev Jun 23, 2025
c77de3c
feat(/track): add same errors for twitch
ToastedDev Jun 23, 2025
b3783bc
Merge pull request #135 from ToastedDev/dev
GalvinPython Jun 23, 2025
8dd8d61
fix: broken functions + #119
GalvinPython Jun 29, 2025
a14ca30
push before merging site into dev
GalvinPython Jun 29, 2025
0f4da00
resolve conflicts (hopefully)
GalvinPython Jun 29, 2025
05bb4ca
Merge branch 'dev' into feat/site
GalvinPython Jun 29, 2025
029059e
Merge pull request #111 from GalvinPython/feat/site
GalvinPython Jun 29, 2025
7f40bd6
chore: slight cleanup
GalvinPython Jun 30, 2025
94aeea3
feat: autocomplete for youtube (#37)
GalvinPython Jul 1, 2025
5488a96
mini changes to db
GalvinPython Jul 2, 2025
c26c0bd
docs: added error handling design rules
GalvinPython Jul 3, 2025
1a1df45
fixed sql
GalvinPython Jul 4, 2025
6f6168b
chore(format): make `youtube.ts` return proper types
GalvinPython Jul 6, 2025
eebea59
feat: track youtube flow is complete 🎉 (closes #81)
GalvinPython Jul 7, 2025
edf36ed
chore: add production deployment scripts
GalvinPython Jul 8, 2025
9bbf2bd
GalvinPython Jul 8, 2025
93876c6
feat: twitch autocomplete
GalvinPython Jul 11, 2025
144a8db
feat: /track twich updated
GalvinPython Jul 12, 2025
669b7b7
Merge branch 'main' into dev
GalvinPython Jul 12, 2025
b81548c
chore(dependabot): move back to npm
GalvinPython Jul 12, 2025
d0a85ef
chore(dependabot): add paths restrictions to dependabot and eslint
GalvinPython Jul 12, 2025
188f2ff
chore(dependabot): update eslint
GalvinPython Jul 12, 2025
a956066
revert: nevermind, removing this from pull requests means no checks
GalvinPython Jul 12, 2025
8ca3d25
Merge pull request #144 from GalvinPython/fix/dependabot
GalvinPython Jul 12, 2025
9593b92
chore(database): start move to drizzle
GalvinPython Jul 13, 2025
323d595
chore(database): update db schema
GalvinPython Jul 16, 2025
89d188e
chore(database): move current (dev) database schema to new one
GalvinPython Jul 16, 2025
fc86ebe
chore(database): remove old database.ts file
GalvinPython Jul 17, 2025
afbeedc
chore(database): clean up errors
GalvinPython Jul 17, 2025
3cb988c
feat(bot): add guild events
GalvinPython Jul 18, 2025
fb6819e
Update src/utils/discord/updateGuildsOnStartup.ts
GalvinPython Jul 18, 2025
c40d5a7
Update src/db/discord.ts
GalvinPython Jul 18, 2025
67d0c18
style: update file based on suggestions
GalvinPython Jul 18, 2025
175abe2
Merge pull request #147 from GalvinPython/feat/guild-events
GalvinPython Jul 18, 2025
2d9f693
fix(bot): make youtube upload notifications work
GalvinPython Jul 19, 2025
b883478
fix(youtube): make content type selection work in fetchLatestUploads
GalvinPython Jul 19, 2025
ae9090b
feat(twitch): wow twitch is back
GalvinPython Jul 20, 2025
9970295
style: run lint
GalvinPython Jul 20, 2025
6ffe403
chore(bot): apply suggestions
GalvinPython Jul 20, 2025
610d915
Merge pull request #145 from GalvinPython/refactor/database
GalvinPython Jul 20, 2025
0417109
feat(bot): add autocomplete to /untrack
GalvinPython Jul 20, 2025
f2462f4
fix(twitch): add streamerName to database in /track
GalvinPython Jul 20, 2025
bcd5c6b
feat(bot): complete /untrack command improvements
GalvinPython Jul 21, 2025
55eb203
fix(bot): nvm i lied, /untracked is now done
GalvinPython Jul 21, 2025
cc46591
Update src/db/discord.ts
GalvinPython Jul 21, 2025
7a768f8
style: run lint
GalvinPython Jul 21, 2025
59be0bb
Merge pull request #148 from GalvinPython/fix/untrack
GalvinPython Jul 21, 2025
7f509a4
chore(bot): update /track but for fallback
GalvinPython Jul 22, 2025
de3d34a
feat(bot): wow its components
GalvinPython Jul 23, 2025
9a4610b
feat(bot): add platform filtering to /tracked
GalvinPython Jul 23, 2025
977a4e3
style: copilot is forcing config :(
GalvinPython Jul 23, 2025
0d2e8ee
Merge pull request #154 from GalvinPython/feat/tracked
GalvinPython Jul 23, 2025
d9b1ead
fix(bot,database): add ephemeral flag + update constraint for dm trac…
GalvinPython Aug 22, 2025
3836aca
feat(bot): optional proxy for innertube
GalvinPython Sep 6, 2025
94c227d
feat(bot): fully implement dm tracking
GalvinPython Sep 8, 2025
b7c7ffe
style: update code based on suggestions
GalvinPython Sep 8, 2025
29c70c5
Merge pull request #167 from GalvinPython/feat/dm-notifications
GalvinPython Sep 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,17 @@ TWITCH_CLIENT_SECRET='YOUR_TWITCH_CLIENT_SECRET'
CONFIG_UPDATE_INTERVAL_YOUTUBE='10'
CONFIG_UPDATE_INTERVAL_TWITCH='2'
CONFIG_DISCORD_LOGS_CHANNEL='YOUR_DISCORD_LOGS_CHANNEL'

# Postgres
POSTGRES_HOST='YOUR_POSTGRES_HOST'
POSTGRES_PORT='YOUR_POSTGRES_PORT'
POSTGRES_USER='YOUR_POSTGRES_USER'
POSTGRES_PASSWORD='YOUR_POSTGRES_PASSWORD'
POSTGRES_DB='YOUR_POSTGRES_DB'

# Postgres Dev
POSTGRES_DEV_HOST='YOUR_POSTGRES_DEV_HOST'
POSTGRES_DEV_PORT='YOUR_POSTGRES_DEV_PORT'
POSTGRES_DEV_USER='YOUR_POSTGRES_DEV_USER'
POSTGRES_DEV_PASSWORD='YOUR_POSTGRES_DEV_PASSWORD'
POSTGRES_DEV_DB='YOUR_POSTGRES_DEV_DB'
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto eol=lf
*.lockb binary diff=lockb
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
- package-ecosystem: "bun"
directory: "/"
schedule:
interval: "weekly"
Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/lockb.yml

This file was deleted.

5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ node_modules/
/backups
*.db
*.sqlite
*.sqlite3
*.sql
*.sqlite3*
*.sql
dbtests.ts
774 changes: 774 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
99 changes: 99 additions & 0 deletions new.dbml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
-- the database schema for feedr 2.0, just here temporarily during development

Table discord {
guild_id string [pk, not null, note: "Discord guild ID"]
is_dm string [default: false, not null]
allowed_public_sharing boolean [default: false, not null, note: "False by default due to privacy stuff"]
}

Table guild_bluesky_subscriptions {
id int [pk, not null, increment]
guild_id string [not null, ref: > discord.guild_id]
bluesky_user_id string [not null, ref: > bluesky.bluesky_user_id]
notification_channel_id string [not null]
notification_role_id string
is_dm boolean [not null, default: false]
check_for_replies boolean [not null, default: false]
}

Table guild_youtube_subscriptions {
id int [pk, not null, increment]
guild_id string [not null, ref: > discord.guild_id]
youtube_channel_id string [not null, ref: > youtube.youtube_channel_id]
notification_channel_id string [not null]
notification_role_id string
is_dm boolean [not null, default: false]
track_videos boolean [default: false, not null]
track_shorts boolean [default: false, not null]
track_streams boolean [default: false, not null]
}

Table guild_twitch_subscriptions {
id int [pk, not null, increment]
guild_id string [not null, ref: > discord.guild_id]
twitch_channel_id string [not null, ref: > twitch.twitch_channel_id]
notification_channel_id string [not null]
notification_role_id string
is_dm boolean [not null, default: false]
}

Table bluesky {
bluesky_user_id string [pk, not null]
latest_post_id string
latest_reply_id string
}

Table youtube {
youtube_channel_id string [pk, not null]
latest_video_id string
latest_video_id_updated datetime
latest_short_id string
latest_short_id_updated datetime
latest_stream_id string
latest_stream_id_updated datetime
youtube_channel_is_live boolean
}

Table twitch {
twitch_channel_id string [pk, not null]
twitch_channel_is_live boolean [not null]
}

Table bot_info {
guilds_total int [not null, default: 0]
channels_tracked int [not null, default: 0]
total_members int [not null, default: 0]
updated_at datetime [not null, default: `now()`]
extended_info_updated_at datetime [not null, default: `now()`]
}

Table bot_info_notifications {
date date [not null]
total_youtube int [not null, default: 0]
total_twitch int [not null, default: 0]
}

Table bot_info_notifications_timings {
time datetime [not null]
channel_id string [not null, ref: > youtube.youtube_channel_id]
time_ms int [not null, default: 0]
}

Table bot_info_top_channels {
youtube_channel_id string [not null, pk, ref: > youtube.youtube_channel_id]
guilds_tracking int [not null, default: 0]
}

Table bot_info_top_guilds {
guild_id int [pk, not null, ref: > discord.guild_id]
members int [not null, default: 0]
}

Table audit_logs {
id int [pk, not null, increment]
event_type string [not null, note: "e.g., subscribe_youtube, unsubscribe_twitch"]
guild_id string [not null, ref: > discord.guild_id]
related_id string [not null, note: "Related YouTube or Twitch channel ID"]
note string
occurred_at datetime [default: `now()`]
}
18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "videonotifier",
"name": "feedr",
"module": "src/index.ts",
"type": "module",
"version": "1.3.0",
"version": "2.0.0-dev",
"devDependencies": {
"@types/bun": "1.1.14",
"@types/bun": "1.2.10",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.1",
"@types/pg": "^8.11.14",
"@typescript-eslint/eslint-plugin": "8.11.0",
"@typescript-eslint/parser": "8.11.0",
"concurrently": "^9.1.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "^2.26.0",
Expand All @@ -19,12 +23,16 @@
},
"scripts": {
"dev": "bun --watch . --dev",
"test:site": "bun --watch src/web/web.ts",
"test:jetstream": "bun --watch src/utils/bluesky/jetstream.ts",
"lint": "eslint . --ext .ts -c .eslintrc.json",
"lint:fix": "eslint . --ext .ts -c .eslintrc.json --fix"
},
"dependencies": {
"cron": "^3.2.1",
"discord.js": "^14.16.3"
"cors": "^2.8.5",
"cron": "^4.3.0",
"discord.js": "^14.19.1",
"express": "^5.1.0",
"pg": "^8.15.6"
}
}
Loading