LoraBotz
is an open source project, based on TypeScript.
- First, If you are using Android to run this script, then the recommended application is Termux & Node.js. Click on the text on the left to download
- Second, if you have installed everything you need, type the command, Clone this Repository:
git clone https://github.com/DitzDev/LoraBotz.git
- Third, Install the required Dependencies and Run, Type command:
npm install
# to run
npm start
Here, I will explain about the usage and function of this code.
- First, the command structure, this can be found in the
/commands/*
directory. This is an example of the code structure:
import { CommandsHelpers } from '../../types/Command'; // Adjust according to where the types folder and command folder are located.
import TelegramBot from 'node-telegram-bot-api'; // This is Mandatory
/**
* You can add any function here
*/
export = {
command: ["your-command"],
categories: ["your-categories"], // This category is a separation of functions between commands and is displayed in the menu.
description: "Your Description Of Command Here",
noPrefix: /*boolean*/,
config: {
requireOwner: /*boolean*/,
requireModerator: /*boolean*/,
requireAdmin: /*boolean*/
},
example: ["%cmd your example here"],
run: async(msg: TelegramBot.Message, { bot, text, args, command, callbackQuery, isCallback }: CommandHelpers) => {
//... Your Code Here
}
}
- About Object function Include:
text
- Is a function that can separate commands and text.args
- It is a command that can be limited by the developer's wishes.command
- Is the command identitybot
- It is the main socket for connecting bot interactions with users.callbackQuery
- This function is a function that can listen to callbacks from commands.isCallback
- Identify whether this is from a callback command or not.
LoraBotz will always be an open source code, Donate a little so I can be more enthusiastic :)