From c3f4b050a58502995f4d14bb568456c1c9be5a89 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Mon, 24 Apr 2023 22:03:05 +1000 Subject: [PATCH] Fix `/bannedwords view` command. --- src/commands/bannedWords.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/bannedWords.ts b/src/commands/bannedWords.ts index 92b7227..385b4c1 100644 --- a/src/commands/bannedWords.ts +++ b/src/commands/bannedWords.ts @@ -20,7 +20,7 @@ export default { }, view: async()=>{ const findAll = await client.bannedWords._content.find({}); - writeFileSync(path.join(__dirname, '../database/bw_dump.json'), JSON.stringify(findAll.map(i=>i._id), null, 2), {encoding: 'utf8', flag: 'w+'}); + writeFileSync('src/database/bw_dump.json', JSON.stringify(findAll.map(i=>i._id), null, 2), {encoding: 'utf8', flag: 'w+'}); interaction.reply({content: 'Here\'s the dump file from the database.', files: ['src/database/bw_dump.json'], ephemeral: true}).catch(err=>interaction.reply({content: `Ran into an error, notify <@&${client.config.mainServer.roles.bottech}> if it happens again:\n\`${err.message}\``, ephemeral: true})) } } as any)[interaction.options.getSubcommand()]();