DiscordPHP-MTG Documentation

SetMessageBuilder extends MessageBuilder
in package

A set as a Components V2 message: what it is, when it came out, how big it is, what boosters it has, with buttons to browse its cards, open a booster and list its decks.

Custom ids: set:cards:<code> (Sets module), pack:open:<code>: (Boosters module, default booster) and deck:set:<code> (Decks module).

Tags
since
1.1.0

Table of Contents

Constants

ACCENT  : int = 0x7a6fb0
The accent color of set messages.
PREFIX  : string = 'set'
The custom id prefix of set components.

Methods

line()  : string
A set as one line of a list.
set()  : static
The set view.

Constants

Methods

line()

A set as one line of a list.

public static line(array<string|int, mixed> $set) : string
Parameters
$set : array<string|int, mixed>

A decoded sets row.

Return values
string

set()

The set view.

public static set(Set $set[, array<string|int, string> $boosters = [] ][, int $decks = 0 ]) : static
Parameters
$set : Set
$boosters : array<string|int, string> = []

The set's booster types, preferred first.

$decks : int = 0

How many preconstructed decks MTGJSON has for it.

Return values
static
On this page

Search results