A typescript rewrite of SealBot
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-10-30 01:53:30 +03:00
src Fix typo 2022-04-28 02:01:32 +03:00
.gitignore Add sqlite3 database 2022-04-03 23:29:46 +03:00
LICENSE Create linence 2022-03-19 16:22:34 +03:00
package.json Update dependencies 2022-04-05 19:33:59 +03:00
README.md Update README.md 2022-10-30 01:53:30 +03:00
tsconfig.json Better file structure 2022-03-15 21:30:05 +03:00

⚠️ 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"'