understanding commited on
Commit
1dee3f3
Β·
verified Β·
1 Parent(s): 5dbdb1f

Update bot/ui/texts.py

Browse files
Files changed (1) hide show
  1. bot/ui/texts.py +42 -65
bot/ui/texts.py CHANGED
@@ -1,74 +1,51 @@
1
- # PATH: bot/ui/texts.py
2
- START_TEXT = (
3
- "βœ… **StudyTube Online**\n\n"
4
- "Send a **video/document** in private chat.\n"
5
- "I will show a preview (title/desc/privacy) and upload to your private YouTube.\n\n"
6
- "πŸ“₯ **Link archive (admin/owner only)**\n"
7
- "β€’ `/archive <t.me link>` (also works with `/yt` or `/dl`)\n"
8
- "β€’ `/batch <start_link> <end_link>`\n\n"
9
- "**Quick**\n"
10
- "β€’ /auth β€’ /profiles β€’ /speedtest β€’ /help\n"
11
- )
12
 
13
- HELP_TEXT = (
14
- "πŸ“Œ **Help**\n\n"
15
- "βœ… **Direct upload flow**\n"
16
- "1) Send a video/document in private chat\n"
17
- "2) Bot shows preview: title/desc/privacy\n"
18
- "3) Press **Upload** (or Edit / Privacy)\n\n"
19
- "πŸ”— **Link archive (admin/owner only)**\n"
20
- "β€’ `/archive https://t.me/c/xxxx/123`\n"
21
- "β€’ Bot fetches via user-session, lets you pick filename, then shows preview\n\n"
22
- "✏️ **Editing title/desc**\n"
23
- "Send message like:\n"
24
- "`My Title`\n"
25
- "`My description line 1`\n"
26
- "`line 2 ...`\n\n"
27
- "⚑ **Speedtest**\n"
28
- "β€’ /speedtest\n\n"
29
- "πŸ›‘οΈ **Owner commands**\n"
30
- "β€’ /allow <id>\n"
31
- "β€’ /disallow <id>\n"
32
- "β€’ /stats\n"
33
- "β€’ /diag\n"
34
- )
35
 
36
- EDIT_PROMPT = (
37
- "✏️ **Send new title/description**\n\n"
38
- "Format:\n"
39
- "β€’ First line = **Title**\n"
40
- "β€’ Remaining lines = **Description** (optional)\n\n"
41
- "Tip: You can send just one line to only change the title.\n"
42
- "(/cancel anytime)"
43
- )
44
 
45
- NEED_AUTH = "❌ No authorized YouTube profile. Use /auth first."
46
- OWNER_ONLY = "❌ Owner only."
47
- NOT_ALLOWED = "❌ You are not allowed to use this bot."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
- ASK_JSON = (
50
- "πŸ“„ **Paste Google OAuth client JSON** (the `client_id` + `client_secret` one)\n\n"
51
- "(/cancel anytime)"
52
- )
53
 
54
- ASK_ID_SECRET = (
55
- "πŸ”‘ **Send Client ID & Secret**\n\n"
56
- "Examples:\n"
57
- "β€’ `client_id | client_secret`\n"
58
- "β€’ `client_id client_secret`\n\n"
59
- "(/cancel anytime)"
60
- )
61
 
62
- CANCELLED = "❎ Cancelled."
63
- PARSE_FAIL = "❌ Couldn't parse. Try again."
64
 
65
- SENT_AUTH_LINK = "βœ… Open this link and authorize:\n"
 
 
 
66
 
67
- PROFILE_ADD_FAIL = "❌ profile_add failed:\n`{}`"
68
- PROFILE_LIST_FAIL = "❌ profile_list failed:\n`{}`"
69
- PICK_FAIL = "❌ pick_profile failed:\n`{}`"
70
- TOKEN_FAIL = "❌ access_token failed:\n`{}`"
71
 
72
- UPLOAD_START = "⬇️ Downloading…"
73
- UPLOAD_TO_YT = "⬆️ Uploading to YouTube…"
74
- DONE = "βœ… Uploaded!"
 
 
 
 
 
 
 
1
+ # FILE: bot/ui/texts.py
 
 
 
 
 
 
 
 
 
 
2
 
3
+ START_TEXT = """🎬 *YouTubeLoader Bot*
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
+ βœ… Send a *video* or *document* in DM β†’ bot will preview β†’ choose privacy/edit β†’ upload.
 
 
 
 
 
 
 
6
 
7
+ *Setup (first time)*
8
+ 1) /auth β†’ add credentials
9
+ 2) /profiles β†’ tap *Login* (Google) β†’ then *Set default*
10
+
11
+ *Commands*
12
+ /start β€” menu
13
+ /help β€” help
14
+ /auth β€” add profile credentials
15
+ /profiles β€” manage profiles (default/login/delete)
16
+ /cancel β€” cancel current upload / batch
17
+
18
+ *Admin/Owner only*
19
+ /archive <t.me message link> β€” upload media from a Telegram message
20
+ /batch <t.me links...> β€” multiple links (one per line)
21
+ /diag β€” show config + worker health
22
+ /allow <tg_id>, /disallow <tg_id>
23
+ /stats β€” today stats
24
 
25
+ Buttons in menu:
26
+ β€’ Profiles β€’ Add Profile β€’ Speed Test β€’ Help
 
 
27
 
28
+ Tip: During download/upload you’ll see *live speed + ETA* and final *download/upload/total time*.
29
+ """
 
 
 
 
 
30
 
31
+ HELP_TEXT = """🧾 *Help*
 
32
 
33
+ *Upload*
34
+ β€’ Send video/document β†’ confirm β†’ upload
35
+ β€’ Use *Edit* button to change title/description
36
+ β€’ Privacy cycles: private β†’ unlisted β†’ public
37
 
38
+ *Profiles*
39
+ β€’ /profiles shows all profiles (connected or not)
40
+ β€’ If not connected, tap *Login*
41
+ β€’ Choose *Set default* to select the profile used for uploads
42
 
43
+ *Common errors*
44
+ β€’ `uploadLimitExceeded` / `quotaExceeded` β†’ YouTube daily limit; try another profile or retry later
45
+ β€’ `WORKER*_URL/... missing` β†’ env not set in Space
46
+ """
47
+
48
+ OWNER_ONLY = "❌ Owner/Admin only."
49
+ NOT_ALLOWED = "❌ You are not allowed to use this bot."
50
+ CANCELLED = "βœ… Cancelled."
51
+ NEED_AUTH = "πŸ” No profiles found. Use /auth to add credentials, then /profiles β†’ Login."