Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ BOT_TOKEN=
API_ENDPOINTS='[
"https://api.cobalt.tools",
{ "url": "https://api.cobalt.tools" },
{ "name": "custom name", "url": "https://api.cobalt.tools", "auth": "Api-Key 123" }
{ "name": "custom name", "url": "https://api.cobalt.tools", "auth": "Api-Key 123", "proxy": "http://proxy.example.com" }
]'

# Optional variables, defaults shown
SELECT_TYPE_PHOTO_URL=https://i.otomir23.me/buckets/cobold/download.png
ERROR_CHAT_ID=
CUSTOM_INSTANCE_PROXY_URL=
4 changes: 4 additions & 0 deletions locales/en.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,9 @@ setting-lang-ru = русский
setting-lang-uk-UA = українська
setting-lang-unset = same as telegram

setting-instance = custom instance
setting-instance-unset = disabled
setting-instance-custom = override

stats-personal = i helped you with downloading { $count } times! (˶ᵔ ᵕ ᵔ˶)
stats-global = i helped with downloading { $count } times! (˶ᵔ ᵕ ᵔ˶)
4 changes: 4 additions & 0 deletions locales/ru.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ setting-attribution-1 = давай
setting-lang = язык
setting-lang-unset = как в тг

setting-instance = кастомный инстанс
setting-instance-unset = выключен
setting-instance-custom = настроить

stats-personal = я помог тебе с загрузкой { $count } раз! (˶ᵔ ᵕ ᵔ˶)
stats-global = я помог с загрузкой { $count } раз! (˶ᵔ ᵕ ᵔ˶)
1 change: 1 addition & 0 deletions migrations/0001_eminent_ultron.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE settings ADD `instance` text;
129 changes: 129 additions & 0 deletions migrations/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"version": "5",
"dialect": "sqlite",
"id": "8f524a1e-29ad-4518-88f2-435c6a3114f0",
"prevId": "a3959bd4-7853-4642-b401-7ed157ba3283",
"tables": {
"requests": {
"name": "requests",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"author_id": {
"name": "author_id",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"settings": {
"name": "settings",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"output": {
"name": "output",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"attribution": {
"name": "attribution",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"language": {
"name": "language",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"instance": {
"name": "instance",
"type": "text",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {
"settings_id_unique": {
"name": "settings_id_unique",
"columns": [
"id"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"users": {
"name": "users",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"downloads": {
"name": "downloads",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false,
"default": 0
}
},
"indexes": {
"users_id_unique": {
"name": "users_id_unique",
"columns": [
"id"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
}
}
7 changes: 7 additions & 0 deletions migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"when": 1720203773408,
"tag": "0000_supreme_ben_urich",
"breakpoints": true
},
{
"idx": 1,
"version": "5",
"when": 1736519894021,
"tag": "0001_eminent_ultron",
"breakpoints": true
}
]
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,23 @@
"dependencies": {
"@fluent/bundle": "^0.18.0",
"@fluent/langneg": "^0.7.0",
"@fuman/fetch": "^0.0.12",
"@mtcute/crypto-node": "^0.19.0",
"@mtcute/dispatcher": "^0.19.1",
"@mtcute/node": "^0.19.3",
"@t3-oss/env-core": "^0.7.1",
"better-sqlite3": "^11.5.0",
"dotenv": "^16.3.1",
"drizzle-orm": "^0.29.3",
"ipaddr.js": "^2.2.0",
"mediainfo.js": "^0.3.2",
"undici": "^7.4.0",
"zod": "^3.22.4"
},
"pnpm": {
"onlyBuiltDependencies": ["better-sqlite3", "esbuild"]
"onlyBuiltDependencies": [
"better-sqlite3",
"esbuild"
]
}
}
Loading