-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathegg-stream-bot.json
More file actions
62 lines (62 loc) · 4.19 KB
/
egg-stream-bot.json
File metadata and controls
62 lines (62 loc) · 4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2025-06-30T09:36:07+03:00",
"name": "StreamBot",
"author": "ysdragon@protonmail.com",
"description": "A self bot to stream videos to Discord.",
"features": null,
"docker_images": {
"Bun Latest": "ghcr.io\/parkervcp\/yolks:bun_latest"
},
"file_denylist": [],
"startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [ -f \/home\/container\/package.json ]; then bun install; fi; bun run start",
"config": {
"files": "{\r\n \".env\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"TOKEN\": \"TOKEN= \\\"{{env.TOKEN}}\\\"\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": [\r\n \"change this text 1\",\r\n \"change this text 2\"\r\n ]\r\n}",
"logs": "{}",
"stop": "^^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n# Bun App Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\n\r\n# Define color codes\r\ndeclare -A colors=(\r\n [\"GREEN\"]='\\033[0;32m'\r\n [\"YELLOW\"]='\\033[0;33m'\r\n [\"NC\"]='\\033[0m'\r\n)\r\n\r\n# Logger function\r\nlog() {\r\n local level=$1\r\n local message=$2\r\n local color=${colors[$3]}\r\n \r\n if [ -z \"$color\" ]; then\r\n color=${colors[NC]}\r\n fi\r\n \r\n printf \"${color}[$level]${colors[NC]} $message\\n\"\r\n}\r\n\r\nlog \"INFO\" \"Installing deps...\" \"GREEN\"\r\napt update\r\napt install -qq -y git curl jq file unzip make gcc g++ python3 python3-dev libtool ffmpeg\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nGIT_ADDRESS=\"https:\/\/github.com\/ysdragon\/StreamBot.git\"\r\n\r\n## pull git js bot repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n log \"INFO\" \"\/mnt\/server directory is not empty.\" \"GREEN\"\r\n if [ -d .git ]; then\r\n log \"INFO\" \".git directory exists\" \"GREEN\"\r\n if [ -f .git\/config ]; then\r\n log \"INFO\" \"loading info from git config\" \"GREEN\"\r\n ORIGIN=$(git config --get remote.origin.url)\r\n else\r\n exit 10\r\n fi\r\n fi\r\n\r\n if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n log \"INFO\" \"Updating from GitHub...\" \"GREEN\"\r\n git pull\r\n fi\r\nelse\r\n if [ -z ${BOT_VERSION} ]; then\r\n log \"INFO\" \"Installing default branch (main)...\" \"GREEN\"\r\n git clone ${GIT_ADDRESS} .\r\n else\r\n log \"INFO\" \"Installing version ${BOT_VERSION}\" \"GREEN\"\r\n git clone --single-branch --branch v${BOT_VERSION} ${GIT_ADDRESS} .\r\n fi\r\nfi\r\n\r\n# Copy .env.example to .env\r\ncp .env.example .env\r\n\r\nlog \"INFO\" \"Installation completed!\" \"GREEN\"\r\n\r\nexit 0",
"container": "ghcr.io\/parkervcp\/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Auto Update",
"description": "Pull the latest files on startup.\r\n0 = false (default)\r\n1 = true",
"env_variable": "AUTO_UPDATE",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|boolean",
"field_type": "text"
},
{
"name": "Bot Version",
"description": "The bot version to install.",
"env_variable": "BOT_VERSION",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string",
"field_type": "text"
},
{
"name": "Bot Token",
"description": "Your real user token for the bot.\r\nhttps:\/\/github.com\/ysdragon\/StreamBot\/wiki\/Get-Discord-user-token",
"env_variable": "TOKEN",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:100",
"field_type": "text"
}
]
}