I'm writing this code and I'm getting a "await is only valid in async function" on the line with an arrow below. I've done a bit of searching around but I'm not entirely sure what's wrong.
if (message.attachments.first()) {
console.log("cool file.")
if (verifyFile(message.attachments.first())) {
console.log("epic file!!")
---> await request.get(message.attachments.first().url).then(async (data) => {
fs.writeFileSync(`${directory}/${message.author.id}_unobfuscated.lua`, data)
var options = {
'method': 'POST',
'url': 'https://obfuscator.aztupscripts.xyz/Obfuscate',
'headers': {
'Content-Type': 'application/x-www-form-urlencoded'
},