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

displus

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

displus

A package that add functions for Discord.

  • 2.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

displus

A package that add functions for Discord.

Usage

const displus = require('displus');
const { Client } = require('discord.js');
const client = new Client({ intents: [/*Required intents...*/] });

client.on('messageCreate', async message => {
  console.log(displus.removeHiddenText('Hello ||World||!')) // 'Hello !'
  console.log(displus.removeHiddenText('Hello <https://example.com/> !')) // 'Hello  !'
  console.log(displus.removeMarkdown('**Hello World!**')); // 'Hello World!'
  console.log(displus.removeMarkdown('Hello __World!__')); // 'Hello World!'
  console.log(displus.removeMarkdown('`Hello` __World!__')); // 'Hello World!'
  console.log(displus.removeMarkdown('Hello <https://example.com/> !')) // 'Hello https://example.com/ !'
  console.log(displus.removeMarkdown('Hello [World](https://example.com/)!')); // 'Hello World!'
  console.log(displus.removeMarkdown('# Hello World!', true)); // 'Hello World!'
  console.log(await displus.replaceMentions(client, guild, '<@957885295251034112>')); // '@otoneko.'
  console.log(displus.rawCode('```js\nconsole.log("Hello World!")\n```')); // 'console.log("Hello World!")
  console.log(displus.emojiId('<:check:1240681820815888505>')); // '1240681820815888505'
  console.log(displus.emojiId('<a:loading:1240671243875913819>')); // '1240671243875913819'
  const invitationText = "There are invitation links! https://discord.gg/yKW8wWKCnS https://discord.com/invite/YnNTMh6mT6";
  console.log(displus.getInvites(invitationText)); // ['yKW8wWKCnS', 'YnNTMh6mT6']
  console.log(displus.getInvites(invitationText, true)); // ['discord.gg/yKW8wWKCnS', 'discord.com/invite/YnNTMh6mT6']
  const embedObject = {
    author: 'This is an embed author!',
    title: 'This is an embed title!',
    redirect: 'https://example.com/',
    descripon: 'This is an embed description!',
    color: '#777000',
    image: 'https://i.imgur.com/EJOjIMC.jpeg'
  };
  console.log(displus.embed(embedObject)); // '[⁠︎]( EMBED URL )'
  console.log(displus.embed(embedObject, true)); // 'EMBED URL'
});

Get Support

Discord Banner

Keywords

FAQs

Package last updated on 17 Oct 2024

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