mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Disable mentions in logs, allowing mods to be mentioned (#142)
Optionally you can return to old behavior by setting allow_user_mentions to true
This commit is contained in:
parent
dea3c2516c
commit
f762a238de
5 changed files with 21 additions and 8 deletions
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
AllowedMentions,
|
||||
Attachment,
|
||||
Client,
|
||||
Constants,
|
||||
|
@ -748,10 +749,14 @@ export function chunkMessageLines(str: string, maxChunkLength = 1990): string[]
|
|||
});
|
||||
}
|
||||
|
||||
export async function createChunkedMessage(channel: TextableChannel, messageText: string) {
|
||||
export async function createChunkedMessage(
|
||||
channel: TextableChannel,
|
||||
messageText: string,
|
||||
allowedMentions?: AllowedMentions,
|
||||
) {
|
||||
const chunks = chunkMessageLines(messageText);
|
||||
for (const chunk of chunks) {
|
||||
await channel.createMessage(chunk);
|
||||
await channel.createMessage({ content: chunk, allowedMentions });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue