Last active
December 4, 2024 20:48
-
-
Save iatomic1/ce90b18aed2dee44bd4bddecdaea57d7 to your computer and use it in GitHub Desktop.
Check levanther message type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { bot, forwardOrBroadCast } = require('../lib/'); | |
bot( | |
{ | |
pattern: 'message ?(.*)', | |
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, null, 2)); | |
} 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