Skip to content

Instantly share code, notes, and snippets.

@iatomic1
Created December 4, 2024 20:07
Show Gist options
  • Save iatomic1/d3f4b7ddd532e1338961a7ff24f13712 to your computer and use it in GitHub Desktop.
Save iatomic1/d3f4b7ddd532e1338961a7ff24f13712 to your computer and use it in GitHub Desktop.
reply
const { bot, forwardOrBroadCast } = require('../lib/');
bot(
{
pattern: 'type ?(.*)',
desc: 'Gets STX balance of the address the command is replied to',
type: 'all',
},
async (message) => {
try {
if (!message.reply_message) {
return await message.send('_Example: Reply .balance to a message_');
}
await message.send(JSON.stringify(message.reply_message));
} catch (error) {
return await message.send(error.message, { quoted: message.data });
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment