@s4d/frontend_blocks

1.1.0 • Public • Published

Frontend_Blocks

This package will provide the basic set of scratch for discord blocks to improve refactoring and efficiency

How to use?

import { Config, Block, WarningBuilder } from "pathToThisPackage/index"

new Config(registerRestrictions)//If this is not added warnings won't work for blocks
new Block("s4d_event_message_wallet").setBlockJSON({
    "message0": "Message block",
    "colour": "#a55b80",
    "output": "message",
    //Blockly json block fields...
})
block1.warning.setWarnings(new WarningBuilder().setType(WarningType.TopLevelParent).setMessage("This block belongs to message event").setTypes("s4d_on_message"))
block1.Register()
//Now u can access the block in toolbox
//toolbox.js

block1.xmlJson.XML()

Readme

Keywords

none

Package Sidebar

Install

npm i @s4d/frontend_blocks

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

43.7 kB

Total Files

35

Last publish

Collaborators

  • mrredo
  • malix_off