remove old sources

This commit is contained in:
MapleLeaf
2021-12-25 13:08:34 -06:00
parent 8ced531144
commit d14086a60c
35 changed files with 116 additions and 1181 deletions

25
src/embed/embed-title.tsx Normal file
View File

@@ -0,0 +1,25 @@
import type { MessageEmbedOptions } from "discord.js"
import React from "react"
import { ReacordElement } from "../element.js"
import { EmbedChildNode } from "./embed-child.js"
export type EmbedTitleProps = {
children: string
url?: string
}
export function EmbedTitle(props: EmbedTitleProps) {
return (
<ReacordElement
props={props}
createNode={() => new EmbedTitleNode(props)}
/>
)
}
class EmbedTitleNode extends EmbedChildNode<EmbedTitleProps> {
override modifyEmbedOptions(options: MessageEmbedOptions): void {
options.title = this.props.children
options.url = this.props.url
}
}