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

discord-convertor

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-convertor

To convert code from one version to another in discord.js The available versions are v11, v12 and 13

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Discord Convertor NPM version

  • To convert code from one version to another in discord.js
  • v13, v12, v11
  • You can put a transfer from it or to it. You have the freedom to move between these versions, whether transferring from the new to the old or from the old to the new.

Installing

You can start install the package on your project:

npm install discord-convertor
yarn add discord-convertor
  • CommonJS
const convertor = require('discord-convertor')
  • ESM
import convertor from 'discord-convertor';

Method

convertor

Parameters:
NameTypeDescription
optionsObjectoptions
options.fromVersionStringThe version to convert from v11, v12 and 13
options.toVersionStringThe version to convert to v11, v12 and 13
options.codeStringyour code

Versions available in the package

  • v13, v12, v11

Examples

const convertor = require('discord-convertor')
const fs = require("fs")
const code = fs.readFileSync('./index.js',{ encoding: 'utf8', flag: 'r' });

console.log(convertor({ code, fromVersion: "v11", toVersion: "v13" }))
const convertor = require('discord-convertor')

// <prefix>convert <fromVersion> <toVersion> <code>
client.on('messageCreate', message => {
  if(!message.guild)return 
  let args = message.content.split(' ').slice(1)
  if(message.content.startsWith(prefix + "convert")){
    let fromVersion = args[0]
    let toVersion =  args[1]
    let code = args.slice(2).join(" ")
    message.author.send(`\`\`\`js\n${convertor({code,fromVersion ,toVersion}).code}\`\`\``)
  }
})

If you have a problem or have a suggestion,

License

Refer to the LICENSE file.

Keywords

FAQs

Package last updated on 13 Jan 2022

Did you know?

Socket

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.

Install

Related posts

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