Use server timezone and date formats in case summaries. Link to cases in case log channel from case summaries.

This commit is contained in:
Dragory 2020-08-10 03:18:34 +03:00
parent 638f9685b1
commit eb203a3b7a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
9 changed files with 178 additions and 62 deletions

View file

@ -0,0 +1,23 @@
import { EmbedField } from "eris";
import { chunkMessageLines, emptyEmbedValue } from "../utils";
export function getChunkedEmbedFields(name: string, value: string, inline?: boolean): EmbedField[] {
const fields: EmbedField[] = [];
const chunks = chunkMessageLines(value, 1014);
for (let i = 0; i < chunks.length; i++) {
if (i === 0) {
fields.push({
name,
value: chunks[i],
});
} else {
fields.push({
name: emptyEmbedValue,
value: chunks[i],
});
}
}
return fields;
}