mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Use server timezone and date formats in case summaries. Link to cases in case log channel from case summaries.
This commit is contained in:
parent
638f9685b1
commit
eb203a3b7a
9 changed files with 178 additions and 62 deletions
23
backend/src/utils/getChunkedEmbedFields.ts
Normal file
23
backend/src/utils/getChunkedEmbedFields.ts
Normal 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;
|
||||
}
|
6
backend/src/utils/getGuildPrefix.ts
Normal file
6
backend/src/utils/getGuildPrefix.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import { PluginData } from "knub";
|
||||
import { getDefaultPrefix } from "knub/dist/commands/commandUtils";
|
||||
|
||||
export function getGuildPrefix(pluginData: PluginData<any>) {
|
||||
return pluginData.guildConfig.prefix || getDefaultPrefix(pluginData.client);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue