mirror of
https://github.com/w1png/SealBotTS.git
synced 2026-10-19 23:01:45 +03:00
A typescript rewrite of SealBot
- TypeScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
⚠️ The project is no longer used thus is not maintained anymore.
Thanks to Boreas hypixel guild for helping with this project :)
SealBotTS
This a Typescript rewrite of SealBot by @BamBoozledMC that focuses on ease of modification and aims to be as modular as possible. You can try this bot in action in Boreas.
Installing dependencies
$ npm install
Running the bot
$ yarn build
$ yarn start
Contributing
Installing dev dependencies
$ npm install --sav-dev
Running in developer mode
Running the bot in developer makes the bot refresh after you make changes to files.
$ yarn dev
Making discord commands
-
Create a new file in discordCommands folder (i.e. ping.ts)
-
Put a template inside the file you've just created:
import { SlashCommandBuilder } from "@discordjs/builders"; import {CommandInteraction} from "discord.js"; export const data = new SlashCommandBuilder() .setName("command_name") // i.e. .setName("ping") will make it a /ping command .setDescription("command_description"); // i.e. .setDescription("allows you see the bot's latency"); export async function execute(interaction: CommandInteraction) { return interaction.reply("reply_text"); // i.e. return interaction.reply("pong!"); } -
Add the command into discordCommands/index.ts
echo '\nexport * as command_name from "./command_file_name"' >> discordCommands/index.tsFor example:
echo '\nexport * as help from "./ping" >> discordCommands/ping.ts' -
Register the new command
yarn deploy:commands
Making minecraft commands
-
Create a new file in minecraftCommands folder (i.e. ping.ts)
-
Put a template inside the file you've just created:
import { sendToMinecraft } from "../MinecraftManager"; export function execute(username: string, args: Array<string>): void { sendToMinecraft("text you want to send to minecraft"); // i.e. sendToMinecraft("pong"); } -
Add the command into minecraftCommands/index.ts
echo '\nexport * as command_name from "./command_file_name"'For example:
echo '\nexport * as ping from "./ping"'