Port !search and !bansearch to Knub 30

This commit is contained in:
Dragory 2020-07-05 15:59:15 +03:00
parent 902b7693e6
commit 954c88bee2
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 476 additions and 7 deletions

View file

@ -1,5 +1,6 @@
import {
Attachment, ChannelInvite,
Attachment,
ChannelInvite,
Client,
Embed,
EmbedOptions,
@ -7,10 +8,12 @@ import {
Guild,
GuildAuditLog,
GuildAuditLogEntry,
GuildChannel, Invite,
GuildChannel,
Invite,
Member,
Message,
MessageContent,
PossiblyUncachedMessage,
TextableChannel,
TextChannel,
User,
@ -1212,3 +1215,7 @@ export function trimPluginDescription(str) {
const firstLineIndentation = (lines[0].match(/^ +/g) || [""])[0].length;
return trimIndents(emptyLinesTrimmed, firstLineIndentation);
}
export function isFullMessage(msg: PossiblyUncachedMessage): msg is Message {
return (msg as Message).createdAt != null;
}