mollermethod mollermethod Settings API Discord

mollermethod API docs

util table

The util table is passed to your plugin with varargs.

local util = ...

The util table has the following functions:

util.notify(text: string) -> void
Display a notification with the given text.

Plugin interface

You return a plugin interface. Here's the TypeScript type since I'm lazy

interface Action {
	display?: string // Displayed in Mollybdos. Defaults to the key, with the first letter uppercase.
	enabled?: () => boolean // Defaults to () => true
	description: string //  Displayed in Bracket autocomplete
	execute(this: void, player: Player): Promise<unknown> | unknown
}

interface Plugin {
	// (will be) displayed in mollermethod settings
	readonly Name: string
	readonly Author: string
	// Runs when the user selects a player in Mollybdos. Call `tag` to add a tag to the player. You can call this multiple times to give the tag a "score."
	readonly Tags?: (player: Player, add: (tag: string) => unknown) => unknown
	readonly Actions?: {
		[key: string]: Action // The key will be used as the Bracket command name
	}
}