mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
24 lines
509 B
TypeScript
24 lines
509 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import type {MessageEmbedField} from '@app/api/database/types/MessageTypes';
|
|
|
|
export class EmbedField {
|
|
readonly name: string;
|
|
readonly value: string;
|
|
readonly inline: boolean;
|
|
|
|
constructor(field: MessageEmbedField) {
|
|
this.name = field.name ?? '';
|
|
this.value = field.value ?? '';
|
|
this.inline = field.inline ?? false;
|
|
}
|
|
|
|
toMessageEmbedField(): MessageEmbedField {
|
|
return {
|
|
name: this.name,
|
|
value: this.value,
|
|
inline: this.inline,
|
|
};
|
|
}
|
|
}
|