From b2f189d6133088ec9b6d25284034e3522424a43e Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 13 May 2024 16:04:23 -0400 Subject: [PATCH] Fix Yoda --- commands/edit-text/yoda.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/edit-text/yoda.js b/commands/edit-text/yoda.js index d64e319d..f81633b4 100644 --- a/commands/edit-text/yoda.js +++ b/commands/edit-text/yoda.js @@ -30,11 +30,12 @@ module.exports = class YodaCommand extends Command { async run(msg, { message }) { const data = new URLSearchParams(); data.append('YodaMe', message); + data.append('go', 'Convert+to+Yoda+Speak!'); const { text } = await request - .post('http://yodaspeak.co.uk/index.php') + .post('http://yodaspeak.co.uk/index.php#mainform') .send(data, true) .set({ 'Content-Type': 'application/x-www-form-urlencoded' }); const $ = cheerio.load(text); - return msg.say($('textarea[name="YodaSpeak"]').first().text().trim()); + return msg.say($('textarea[name=\'YodaSpeak\']').first().text().trim()); } };