🐛 fix Webhook model

This commit is contained in:
Flam3rboy
2021-04-24 14:30:48 +02:00
parent 2c39b659a5
commit d7cf341320
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -80,4 +80,5 @@ WebhookSchema.virtual("source_channel", {
WebhookSchema.set("removeResponse", ["source_channel_id", "source_guild_id"]);
// @ts-ignore
export const WebhookModel = db.model<WebhookDocument>("Webhook", WebhookSchema, "webhooks");
+2 -1
View File
@@ -1,6 +1,7 @@
import { DOUBLE_WHITE_SPACE, SPECIAL_CHAR } from "./Regex";
export function trimSpecial(str?: string) {
export function trimSpecial(str?: string): string {
// @ts-ignore
if (!str) return;
return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim();
}