diff --git a/public/adjectives.txt b/public/adjectives.txt index f0863d26..1e871526 100644 --- a/public/adjectives.txt +++ b/public/adjectives.txt @@ -1498,4 +1498,4 @@ wheat white whitesmoke yellow -yellowgreen +yellowgreen \ No newline at end of file diff --git a/public/animals.txt b/public/animals.txt index d90bc702..8b80ace2 100644 --- a/public/animals.txt +++ b/public/animals.txt @@ -1747,4 +1747,4 @@ zigzagsalamander zonetailedpigeon zooplankton zopilote -zorilla +zorilla \ No newline at end of file diff --git a/src/lib/format/gfycat.ts b/src/lib/format/gfycat.ts index 7d8d4d9a..114b8b86 100644 --- a/src/lib/format/gfycat.ts +++ b/src/lib/format/gfycat.ts @@ -6,8 +6,8 @@ export type GfyCatWords = { }; export async function importWords(): Promise { - const adjectives = (await readFile('public/adjectives.txt', 'utf-8')).split('\n'); - const animals = (await readFile('public/animals.txt', 'utf-8')).split('\n'); + const adjectives = (await readFile('public/adjectives.txt', 'utf-8')).split('\n').map((x) => x.trim()); + const animals = (await readFile('public/animals.txt', 'utf-8')).split('\n').map((x) => x.trim()); return { adjectives, @@ -22,5 +22,5 @@ function randomWord(words: string[]) { export default async function gfycat() { const words = await importWords(); - return `${randomWord(words.adjectives)}${randomWord(words.adjectives)}${randomWord(words.animals)}`; + return `${randomWord(words.adjectives)} ${randomWord(words.adjectives)} ${randomWord(words.animals)}`; }