Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

HStudioDiscordBot/HStudioSource

Repository files navigation

HStudio Source Code

The best music bot created by @hewkawar


CodeFactor GitHub Actions Workflow Status GitHub language count GitHub License GitHub package.json prod dependency version

Table of Contents

Installation

First, install the necessary dependencies:

npm install

Environment Variables

Configure the following environment variables before running the bot:

Discord Developer

Set up your bot token and client ID from the Discord Developer Portal:

# Discord bot token
TOKEN=your_discord_bot_token_here

# Discord client ID
CLIENT_ID=your_client_id_here

TrueMoney Wallet Voucher

# TrueMoney phone number
TRUEMONEY_PHONE_NUMBER=your_truemoney_phone_number_here

Webhook

# Webhook URLs
DONATE_WEBHOOK_URL=your_donate_webhook_url_here
ERROR_WEBHOOK_URL=your_error_webhook_url_here

Lavalink

Configure your Lavalink nodes. More information here:

# Nodes configuration
NODES='[{"identifier":"Local", "regions": ["My Home"], "host":"0.0.0.0","port":2333,"password":"your_lavalink_password","secure":false}]'

Log

# Analytics channel ID
ANALYTIC_CHANNEL_ID=your_analytic_channel_id_here

# Log channel ID
GUILD_LOG=your_guilds_log_channel_id_here

Shards

# Total Shards default "auto"
SHARDS=auto

MongoDB

Set your MongoDB connection URL. More information here:

# MongoDB connection URL
MONGODB_URL=your_mongodb_url_here

Config

# Server port
PORT=8233

Running the Bot

Using Docker

Run the bot using Docker with the following command:

docker run -d --restart always \
    --name hstudio \
    -e TOKEN=your_discord_bot_token_here \
    -e CLIENT_ID=your_client_id_here \
    -e TRUEMONEY_PHONE_NUMBER=your_truemoney_phone_number_here \
    -e DONATE_WEBHOOK_URL=your_donate_webhook_url_here \
    -e NODES='[{"identifier":"Local", "regions": ["My Home"], "host":"0.0.0.0","port":2333,"password":"your_lavalink_password","secure":false}]' \
    -e ANALYTIC_CHANNEL_ID=your_analytic_channel_id_here \
    -e MONGODB_URL=your_mongodb_url_here \
    -e GUILD_LOG=your_log_channel_id_here \
    -e SHARDS=auto \
    -e PORT=8233 \
    -p 8233:8233 \
    hewkawar/hstudio-bot:latest

From Source Code

Clone the repository and install the dependencies:

git clone https://github.com/HStudioDiscordBot/HStudioSource.git
cd HStudioSource
npm install

Make sure to configure your .env file before running the bot:

npm run bot

Translators

HStudio uses Crowdin for localization management.

Support

For support, join our Discord server.