Skip to content

herzonly/DHX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

141 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DHX - Advanced Telegram Bot

A simple and lightweight Telegram bot base built with Telegraf library. Easy to use with minimal resource consumption.

✨ Features

  • πŸš€ Simple and clean code structure
  • πŸ’Ύ Low resource usage
  • πŸ”§ Easy to customize and extend
  • ⚑ Fast and responsive
  • πŸ“¦ Built with Telegraf library

Bot Function Docs

under development ☹️ please wait

πŸ“‹ Prerequisites

  • Node.js v18 or newer
  • npm or yarn
  • Telegram Bot Token from @BotFather

Minimum Server Requirements

  • CPU: 50% (1 core)
  • RAM: 1GB
  • Disk Space: 1GB

πŸ› οΈ Installation

  1. Clone the repository
git clone https://github.com/herzonly/DHX.git
cd DHX
  1. Install dependencies
npm install
  1. Configure the bot
# Edit config.js and fill in your bot configuration
nano config.js
  1. Fill in the configuration in config.js
global.TOKEN = "YOUR_BOT_TOKEN_HERE"

global.wm = "β€’ Dash X API"
global.wait = "__**Wait a minute...**__"
// Required, register at https://api.dashx.dpdns.org
global.dhx = "YOUR_DHX_API_KEY"

global.owner = ["YOUR_TELEGRAM_ID"]
global.mods = []
global.prems = []

global.prefix = /^[.,!/#]/
global.botName = "DashX Bot"
global.ownerName = "Owner"
global.wm = "DHX"
global.sig = "https://instagram.com/notme_botz"
global.thumb = "https://telegra.ph/file/a8e9f9edf366707fbadf1.jpg"

global.multiplier = 69

global.APIs = {
  api1: 'https://api.example.com'
}

global.APIKeys = {
  'https://api.example.com': 'your-api-key'
}

global.opts = {
  self: false,
  restrict: false,
  test: false,
  tmp: false
}

global.myfile = Buffer.from("aGVsbG8=", "base64")
global.minety = "application/pdf"

πŸš€ Usage

Start the bot:

npm start

For development with auto-reload:

npm run dev

πŸ“ Project Structure

DHX/
β”œβ”€β”€ plugins/          # Bot command handlers
β”œβ”€β”€ handler.js          # Event handlers
β”œβ”€β”€ lib/              # Utility functions
β”œβ”€β”€ config.js         # Configuration file
β”œβ”€β”€ index.js          # Main entry point
└── package.json

πŸ“ Adding New Commands

Create a new file in the plugins/ directory:

let handler = async (m, { bot }) => {
  const username = m.from.first_name || 'User'
  const botname = bot.botInfo?.first_name || 'Bot'
  
  let txt = `πŸ‘‹ Hi *${username}*! My name is *${botname}*\n\n`
  
  txt += `Welcome to my service! I'm here to assist you with various features and commands. `
  txt += `I'm designed to make your experience smooth and enjoyable while providing you with useful tools and information.\n\n`
  
  txt += `πŸ€– *About Me*\n`
  txt += `I am an advanced automated assistant built to help you with multiple tasks. `
  txt += `Whether you need information, entertainment, or just someone to chat with, I'm always ready to serve you 24/7.\n\n`
  
  txt += `✨ *What I Can Do*\n`
  txt += `β€’ Provide quick responses to your queries\n`
  txt += `β€’ Execute various commands and features\n`
  txt += `β€’ Deliver accurate information\n`
  txt += `β€’ Assist you with daily tasks\n`
  txt += `β€’ And much more!\n\n`
  
  txt += `πŸ“š *Getting Started*\n`
  txt += `To see all available commands and features, simply type /help or /menu. `
  txt += `You can explore different categories and discover what I can do for you. `
  txt += `Don't hesitate to try out different commands!\n\n`
  
  txt += `πŸ’‘ *Tips*\n`
  txt += `β€’ All commands start with / (slash)\n`
  txt += `β€’ Type /ping to check my response speed\n`
  txt += `β€’ Use /info to learn more about me\n`
  txt += `β€’ Feel free to ask questions anytime\n\n`
  
  txt += `🌟 Thank you for using my service! I hope you have a great experience. `
  txt += `If you encounter any issues or have suggestions, please don't hesitate to reach out to my developer.\n\n`
  
  txt += `Let's get started on this amazing journey together! πŸš€`
  
  await m.reply(txt, { parse_mode: 'Markdown' })
}

handler.help = ['start']
handler.tags = ['main']
handler.command = /^(start)$/i

module.exports = handler

Command Properties

  • handler.help - Array of command names shown in help menu
  • handler.tags - Command category
  • handler.command - Regex pattern for command trigger

πŸ”§ Configuration Options

  • TOKEN - Your Telegram bot token from BotFather
  • dhx - DashX API key (register at https://api.dashx.dpdns.org)
  • owner - Array of owner Telegram IDs
  • mods - Array of moderator Telegram IDs
  • prems - Array of premium user Telegram IDs
  • prefix - Command prefix regex pattern
  • botName - Your bot's display name
  • APIs - External API endpoints
  • APIKeys - API authentication keys

🀝 Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests

πŸ“„ License

This project is licensed under the CCZ LICENSE

πŸ‘€ Developer

Created by herzonly

πŸ”— Links

⭐ Support

If you find this project helpful, please give it a star!

πŸ’– Donate

If you'd like to support the development of this project, you can donate through:

Your support is greatly appreciated! πŸ™


Made with β™₯️ and lot of 🍡

Herza NGT

About

An advanced telegram bot, easy to use and have an awesome feature, if u like this project give me a star 😎, not for sale !!!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors