tightening coverage + some cleanup

This commit is contained in:
MapleLeaf
2021-12-27 03:04:15 -06:00
parent c56abcaa34
commit 05d2367881
5 changed files with 89 additions and 180 deletions

View File

@@ -5,7 +5,7 @@ import type { OptionProps } from "./option"
export class OptionNode extends Node<OptionProps> {
get options(): MessageSelectOptionOptions {
return {
label: this.props.children || this.props.label || this.props.value || "",
label: this.props.children || this.props.label || this.props.value,
value: this.props.value,
description: this.props.description,
emoji: this.props.emoji,

View File

@@ -3,6 +3,6 @@ import { Node } from "./node.js"
export class TextNode extends Node<string> {
override modifyMessageOptions(options: MessageOptions) {
options.content = (options.content ?? "") + this.props
options.content = options.content + this.props
}
}