2021-10-30 17:26:41 +00:00
|
|
|
import * as moment from 'moment';
|
|
|
|
import { Message } from '../data-types';
|
2021-11-22 02:47:29 +00:00
|
|
|
import CombinedGuild from '../guild-combined';
|
2021-11-07 16:50:30 +00:00
|
|
|
import Q from '../q-module.js';
|
2021-10-30 17:26:41 +00:00
|
|
|
|
|
|
|
import ElementsUtil from './require/elements-util.js';
|
|
|
|
|
2021-11-21 18:29:42 +00:00
|
|
|
export default function createTextMessageContinued(q: Q, guild: CombinedGuild, message: Message): HTMLElement {
|
2021-11-22 02:47:29 +00:00
|
|
|
return q.create({ class: 'message continued', 'meta-id': message.id, 'meta-member-id': message.member.id, 'meta-guild-id': guild.id, content: [
|
2021-11-07 16:50:30 +00:00
|
|
|
{ class: 'timestamp', content: moment(message.sent).format('HH:mm') },
|
|
|
|
{ class: 'right', content: [
|
|
|
|
{ class: 'content text', content: ElementsUtil.parseMessageText(message.text ?? '') }
|
|
|
|
] }
|
|
|
|
] }) as HTMLElement;
|
2021-10-30 17:26:41 +00:00
|
|
|
}
|