module.exports = { data: newSlashCommandBuilder() .setName('query') .setDescription('Query staking NFT!') .addStringOption(option => option.setName('id') .setDescription('ID of NFT') .setRequired(true)), asyncexecute(interaction) { // process your case here
var val = parseInt(interaction.options.get('id').value);
const res = awaitNFT.methods.revvingPeriod(val).call(function (err, res) { if (err) { console.log("An error occured", err); return; } });
const staking = res[0]; if(staking){ await interaction.reply('`ID ' + val + ' is staking!`✅'); }else{ await interaction.reply('`ID ' + val + " isn't staking!`❌"); } }, };