JSPM

amtixdev-morse-code

1.1.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q33834F
  • License ISC

Discord Fun Morse Code For Discord Bots

Package Exports

  • amtixdev-morse-code
  • amtixdev-morse-code/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (amtixdev-morse-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


amtixdev-morse-code

Discord server NPM version NPM downloads

AmtiXDev

Examples/How Package amtixdev-morse-code Work?

How To Install Package?

npm install amtixdev-morse-code

How To Use Package

const { textToMorse, morseToText } = require('amtixdev-morse-code');

client.on('messageCreate', (message) => {
  if (message.author.bot) return; // Ignore messages from other bots

  const args = message.content.split(' ');
  const command = args[0].toLowerCase();

  if (command === '!morse') {
    // Convert text to Morse code
    const text = args.slice(1).join(' ');
    const morse = textToMorse(text);
    message.channel.send(`Morse code: ${morse}`);
  }

  if (command === '!decode') {
    // Decode Morse code to text
    const morse = args.slice(1).join(' ');
    const text = morseToText(morse);
    message.channel.send(`Decoded message: ${text}`);
  }
});

By AmtiXDev

Image

If You Need Help About How The Npm Package Work? Contant Me HERE

All rights reserved to AmtiXDev