Skip to content

Commit

Permalink
fix: haiku util order
Browse files Browse the repository at this point in the history
  • Loading branch information
ducktrshessami committed Feb 17, 2024
1 parent d78c16a commit de7707a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/discord/haiku.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { syllablize } from "fast-syllablize";
import { Entry, getDict } from "node-cmudict";

const Dict = getDict();
const UrlPattern = /https?:\/\/(?:www\.)?[-A-Z0-9@:%._\+~#=]{1,256}(?:\.[A-Z0-9()]{1,6})?\b(?:[-A-Z0-9()@:%_\+.~#?&\/=]*)/i;
const NonWordPattern = getNonWordPattern();
const WordPattern = /[A-Z]+/gi;
const Dict = getDict();

export function haikuable(content: string): boolean {
return !UrlPattern.test(content);
Expand Down

0 comments on commit de7707a

Please sign in to comment.