Skip to content

w1png/SealBotTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ 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
  1. Create a new file in discordCommands folder (i.e. ping.ts)

  2. 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!");
    }
  3. Add the command into discordCommands/index.ts

    echo '\nexport * as command_name from "./command_file_name"' >> discordCommands/index.ts

    For example:

    echo '\nexport * as help from "./ping" >> discordCommands/ping.ts'
  4. Register the new command

    yarn deploy:commands
Making minecraft commands
  1. Create a new file in minecraftCommands folder (i.e. ping.ts)

  2. 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");
    }
  3. Add the command into minecraftCommands/index.ts

    echo '\nexport * as command_name from "./command_file_name"'

    For example:

    echo '\nexport * as ping from "./ping"'