# Structures

Structures is a class which allows you to either get, or extend and already existant structure class/prototype within the framework. However it is an abstract class, and you cannot instantiate it. It's methods are static, which means that you can access them without instantiating the class.
Current structures that are extensible:

  • AbrevioClient
  • BaseEvent
  • BaseCommand
  • Piece
  • Utils
  • Parser

# Example of how to extend a valid structure correctly

(TS)

import { Structures, AbrevioClient, BaseCommandOptions } from "abrevio";

export default Structures.extend("BaseCommand", Command => { 

    return class MyNewCommand extends Command {
        client: AbrevioClient;
        options: BaseCommandOptions;
        coolFeature: string;

        constructor(client: AbrevioClient, options: BaseCommandOptions) {

            this.client = client;
            this.options = options;
            this.coolFeature = "Hey! This is pretty cool!";
        }

        get coolFreature() {
            return this.coolFeature;
        }
    }
});

(JS)

const { BaseCommand } = require("abrevio");

Object.assign(BaseCommand, { coolFeature: "Hey! This is pretty cool!" });