
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
sphinx-bot
Advanced tools

The Sphinx Javascript bot framework is inspired by Discord's bot creation library. So far we have only implemented simple Message creation, but there are exciting times ahead for bot developers on Sphinx!

Every sphinx-relay instance has a built-in bot called MotherBot. MotherBot is how you can search, install, and uninstall bots.
/bot search Bitcoin/bot install btc/bot uninstall btcBots can be created on your sphinx-relay instance. By creating a bot, you are generating a bridge from the Lightning Network to the regular web (http). Bots are secured with a secret key that is generated when a bot is created. HTTPS should be used for all Bot endpoints.
connect your bot
const client = new Sphinx.Client();
client.login(process.env.SPHINX_TOKEN);
create a bot Message
const embed = new Sphinx.MessageEmbed()
.setAuthor("TestBot")
.setDescription("Welcome to TestBot!");
respond to a "bot install" message
client.on(msg_types.INSTALL, async (message) => {
const embed = new Sphinx.MessageEmbed()
.setAuthor("TestBot")
.setDescription("Welcome to TestBot!")
.setThumbnail("<svg></svg>");
message.channel.send({ embed });
});
respond to a chat message
client.on(msg_types.MESSAGE, async (message) => {
// do something here!
const embed = new Sphinx.MessageEmbed()
.setAuthor("TestBot")
.setTitle("TestBot Message:")
.addFields([
{ name: "Item #1:", value: "hello", inline: true },
{
name: "Item #2:",
value: "hello again",
inline: true,
color: "#00FF00",
},
])
.setThumbnail("<svg></svg>");
message.channel.send({ embed });
});
respond to a chat message outside of the event emitter
client.channels.cache.get(CHANNEL).send(<Sphinx.Msg>{
content: `This is a message!`,
});
boost a tribe member's message
// you can get CHANNEL from a "message.channel.id"
client.channels.cache.get(CHANNEL).pay(<Sphinx.Msg>{
amount: 1000,
reply_id: "xxx", // optional uuid "message.reply_id"
recipient_id: 1, // id of the tribe member "message.member.id"
});
new Sphinx.Client()client.login(process.env.SPHINX_TOKEN)client.on(msg_types.INSTALL, callback)client.on(msg_types.MESSAGE, callback)setTitle(title:string)setAuthor(author:string)setColor(color:string)setDescription(desc:string)setThumbnail(thumb:string)setImage(image:string)addField(f:Field)addFields(fs:Field[])// "fields" are items in a list:
{
"name": "string",
"value": "string",
"inline?": "boolean",
"color?": "string"
}
FAQs
Sphinx chat bots
The npm package sphinx-bot receives a total of 242 weekly downloads. As such, sphinx-bot popularity was classified as not popular.
We found that sphinx-bot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.