Skip to content
Closed

games #226

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
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BOT_TOKEN=
CLIENT_ID=
GUILD_ID=
# Optional override for default round interval (minutes)
# GUESS_INTERVAL_MINUTES=30

81 changes: 11 additions & 70 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,70 +1,11 @@
# Copy this file to .env and replace placeholder values.

# Discord Bot Configuration
DISCORD_TOKEN=your_discord_bot_token_here
CLIENT_ID=your_discord_client_id_here
# Your server ID (used in the setup tutorial; slash commands register globally via CLIENT_ID).
GUILD_ID=your_discord_guild_id_here
OWNER_IDS=your_discord_id_here (optional)

# Bot Runtime Configuration
NODE_ENV=production
LOG_LEVEL=warn
LOG_TO_FILE=false
SENTRY_DSN=

# Web/API Configuration
PORT=3000
WEB_HOST=0.0.0.0
PORT_RETRY_ATTEMPTS=5
CORS_ORIGIN=*

# PostgreSQL Configuration (Primary Database)
# Railway: use the private POSTGRES_URL / DATABASE_URL variable (includes SSL).
# Public proxy logs showing "invalid length of startup packet" or "SSL without ALPN"
# are usually internet scanners — not your bot.
POSTGRES_URL=postgresql://postgres:yourpassword@localhost:5432/titanbot
POSTGRES_SSL=
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_DB=titanbot
POSTGRES_USER=postgres
POSTGRES_PASSWORD=yourpassword

# PostgreSQL Pool/Timeout Settings
POSTGRES_MAX_CONNECTIONS=20
POSTGRES_MIN_CONNECTIONS=2
POSTGRES_CONNECTION_TIMEOUT=10000
POSTGRES_IDLE_TIMEOUT=30000
POSTGRES_RETRIES=3
POSTGRES_BACKOFF_BASE=100
POSTGRES_BACKOFF_MULTIPLIER=2

# Migration & Schema Settings
AUTO_MIGRATE=true
POSTGRES_MIGRATION_TABLE=schema_migrations
SCHEMA_VERSION=1
SCHEMA_VERSION_LABEL=baseline-v1

# Backup/Restore Script Settings
BACKUP_DIR=./backups
BACKUP_RETENTION_DAYS=14
POSTGRES_RESTORE_URL=

# Music (Lavalink + Riffy) — requires Lavalink v4 nodes
# Default: loads public v4 SSL nodes from lavalink/nodes.json
# Source: https://lavalink.darrennathanael.com/SSL/Lavalink-SSL/
# LAVALINK_NODES_FILE=lavalink/nodes.json
# Optional: override nodes as JSON array (takes priority over nodes file)
# LAVALINK_NODES=[{"host":"lavalink","port":2333,"password":"youshallnotpass","secure":false,"name":"Main"}]
# Self-hosted single node fallback (used only if nodes file/env array are absent):
# LAVALINK_HOST=localhost
# LAVALINK_PORT=2333
# LAVALINK_PASSWORD=youshallnotpass
# LAVALINK_SECURE=false
# LAVALINK_NAME=Main
LAVALINK_SEARCH_PLATFORM=ytmsearch
LAVALINK_REST_VERSION=v4

# Optional Feature/API Keys
TMDB_API_KEY=
BOT_TOKEN=your_bot_token_here
CLIENT_ID=your_application_client_id_here
GUILD_ID=your_discord_server_id_here
# Optional override for default round interval (minutes)
# GUESS_INTERVAL_MINUTES=30
# Milliseconds to wait before the first scheduled round after setup (default 0)
# GUESS_FIRST_ROUND_DELAY_MS=0
# Set to 1 while testing to print the secret number in the bot console when a round starts
# GUESS_TEST_REVEAL_SECRET=1
# Seconds each round stays open (default 60)
# GUESS_ROUND_SECONDS=60
150 changes: 4 additions & 146 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,146 +1,4 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Local development files
.local/
attached_assets/

# Configuration and cache files
.config/
.git.backup.*

# Diagnostic reports (https:
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https:
.grunt

# Bower dependency directory (https:
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https:
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https:
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https:
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https:
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Replit debugger
.breakpoints
.git.backup.*

# Database backup artifacts
backups/
*.dump
node_modules/
data/
.env
config.js
15 changes: 15 additions & 0 deletions config.example.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
require("dotenv").config();

module.exports = {
accentColor: 0x5865f2,
guessGame: {
defaultIntervalMinutes: Number(process.env.GUESS_INTERVAL_MINUTES || 30),
minIntervalMinutes: 5,
maxIntervalMinutes: 120,
pointsBase: 10,
pointsBonusMax: 7,
roundDurationSeconds: Number(process.env.GUESS_ROUND_SECONDS || 60),
/** Delay before the first scheduled round after setup (ms). 0 = as soon as the scheduler runs. */
firstRoundDelayMs: Number(process.env.GUESS_FIRST_ROUND_DELAY_MS || 0),
},
};
25 changes: 9 additions & 16 deletions lavalink/nodes.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
[
{
"host": "lavalinkv4.serenetia.com",
"host": "lavalink.obscure.cloud",
"port": 443,
"password": "https://seretia.link/discord",
"password": "https://discord.gg/obscure",
"secure": true,
"name": "Serenetia"
"name": "Obscure Cloud"
},
{
"host": "lavalink.jirayu.net",
"host": "lavalink.slaveofj8.com",
"port": 443,
"password": "youshallnotpass",
"password": "https://discord.gg/Njns3eKvye",
"secure": true,
"name": "Jirayu"
"name": "SlaveOfJ8"
},
{
"host": "lava-v4.millohost.my.id",
"host": "lavalink.nxvaa.me",
"port": 443,
"password": "https://discord.gg/mjS5J2K3ep",
"password": "https://discord.gg/dEJ6NSjXvx",
"secure": true,
"name": "MilloHost"
},
{
"host": "lavalink-v4.triniumhost.com",
"port": 443,
"password": "free",
"secure": true,
"name": "TriniumHost"
"name": "NXVAA"
}
]
Binary file added macedonian communitybot.zip
Binary file not shown.
Loading