Skip to content

Commit

Permalink
Fix Yoda
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyissillyyy committed May 13, 2024
1 parent 244306e commit b2f189d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/edit-text/yoda.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
};

0 comments on commit b2f189d

Please sign in to comment.