1.5.5 • Published 2 years ago

discord.js-easy-embed v1.5.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

About

The easy-embed is a package to make Discord.js Embeds most easier to use


How to use

TypeScript:

import EasyEmbed from "discord.js-easy-embed";
export const createEmbed = new EasyEmbed().create;

console.log(createEmbed('success', 'testing..'));

/* returns:
{
  embeds: [
    MessageEmbed {
      type: 'rich',
      title: '✅ | testing..',
      description: null,
      color: GREEN,
      ...
    }
  ],
  ephemeral: true
}
*/

JavaScript:

const EasyEmbed = require('discord.js-easy-embed').EasyEmbed;

const createEmbed = new EasyEmbed().create;

console.log(createEmbed('wait', 'testing..'));

/* returns:
{
  embeds: [
    MessageEmbed {
      type: 'rich',
      title: '⌚ | testing..',
      description: null,
      color: PURPLE,
      ...
    }
  ],
  ephemeral: true
}
*/

Adding your config

const embedGenerator = new EasyEmbed({
  // If enabled, all messages are ephemeral by default
  ephemeral: true,
  // The character that stay between emoji and title
  separator: ' - ',
  // Types of embeds
  types: [
    {
      // Color of embed line
      color: '#F5F5F5'
      // Name is only used if the text of embed is most big than 40 characters
      name: 'Accepted',

      emoji: '✅',
    }
  ]
});

embedGenerator.create('Accepted', 'heheeeh', {
  // Options of Interaction/Messages (optional)
  
  components: [],
  files: [],
  // If this option is undefined, the ephemeral of constructor is used
  ephemeral: false
})
1.5.5

2 years ago

1.5.4

2 years ago

1.4.5

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.4

2 years ago

1.4.3

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago