So i am trying to get this where when a user inputs a command “steamid” it will go through the google sheet “data” and search for the “steamid”. If the steamid is found in the google sheet it will display blacklisted.
( async () => {
const data = await readSheet();
if (interaction.commandName === 'checkbl') {
const steamid = interaction.options.get('steamid').value;
if (steamid == data) {
interaction.reply(`${steamid} is blacklisted`);
} else {
interaction.reply(`${steamid} is not blacklisted`);
console.log(steamid)
}
}
})()
I have used console.log(steamid)
and console.log(data)
to confirm i am getting both the users input and google sheets data, which i am. I am just confused as to why its not displaying if the steamid is or isn’t blacklisted.
New contributor
famq is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.