Skip to content

Prototype

shysolocup edited this page Aug 20, 2024 · 8 revisions

a class prototype template thing that dictates what should be the basis for all instances

the main big thing for the module that does all the big cool awesome things

Lua
local class = require("classjs")("class");


local Example = class "Example" {
    constructor = function(self, name)
        self.Name = name;
    end,

    Test = function(self)
        return string.lower(self.Name)                            
    end,

    Type = 1

};


print(Example) -- [class Example]

Metatable

Arguments:

  • ?settings Object
    object with different settings for the client
    possible settings:
  • intents Array or Number: gateway intents for the client
  • prefix String: prefix for commands



classjs docs

Home | Lib


Keywords

πŸ›ˆ class

πŸ›ˆ extend

πŸ›ˆ new

Methods

πŸ›ˆ isa()

πŸ›ˆ getclass()

πŸ›ˆ Prototype

πŸ›ˆ new()

πŸ›ˆ __isa()

πŸ›ˆ __super()

πŸ›ˆ __name

πŸ›ˆ __instances

πŸ›ˆ __prototype

πŸ›ˆ __extendee

πŸ›ˆ __class

πŸ›ˆ PrototypeItem

πŸ›ˆ new()

πŸ›ˆ __value

πŸ›ˆ __parent

πŸ›ˆ __writable

πŸ›ˆ __configurable

πŸ›ˆ __enumerable

πŸ›ˆ Object

πŸ›ˆ defineProperties()

πŸ›ˆ defineProperty()

πŸ›ˆ entries()

πŸ›ˆ getOwnPropertyDescriptor()

πŸ›ˆ getOwnPropertyDescriptors()

πŸ›ˆ keys()

πŸ›ˆ values()


Clone this wiki locally