Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bfd-api-redux

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfd-api-redux - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

2

package.json
{
"name": "bfd-api-redux",
"version": "1.0.9",
"version": "1.1.0",
"description": "A node.js wrapper for the Bots For Discord API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -111,4 +111,37 @@ const EventEmitter = require("events");

}
async updateCard(enabled, content, id = this._id, token = this._token) {
return new Promise((resolve, reject) => {
const data = JSON.stringify({
enabled: enabled,
content: content
})
const options = {
hostname: 'discords.com',
port: 443,
path: `/bots/api/bot/${id}/card`,
method: 'POST',
headers: {
'Content-Type': 'application/json',
'authorization': token
}
}
const req = https.request(options, res => {
res.on('data', d => {
resolve(JSON.parse(d.toString("utf-8")));
})
})
req.on('error', error => {
reject(error)
})
req.write(data)
req.end()
})
}
}
module.exports = bfd;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc