Me6 Discord

Dec 24th, 2017

Official Discord - how to make a Discord Server with this video. I show how to add roles on Discord, how to make private Dis.

Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
  1. MEE6 is a Discord bot looking to bring great new features to your Discord server! We bring moderation, entertainment, and some utility features, like reddit/twitch/youtube notifications, to your server. Skill up your server with the OG level bot. Still confused about what we do? Use!help or visit https://mee6.xyz/features.
  2. MEE6 is a fun, feature packed, and fantastic Discord bot that aims to connect people to the communities they love on Discord, that is currently in over 3.4 Million servers across the platform. Discord Boats is a growing directory of Discord bots to enhance your server - Find the perfect bot for your needs and add it to your server easily.
  1. Custom Commands
  2. !avatar
  3. !channelinfo
  4. !cmd
  5. !commands
  6. !dashboard
  7. !dropbox
  8. !emoji_table
  9. !faq
  10. !git
  11. !guide
  12. !helpme
  13. !id
  14. !lennyforlife
  15. !logout
  16. !music
  17. !music-sites
  18. !mute
  19. !play-music
  20. !radio2
  21. !reddit
  22. !role-rewards
  23. !serverinfo
  24. !skill
  25. !slowmodeinfo
  26. !stats
  27. !todo
  28. !twitch
  29. !variables
  30. Moderator
  31. !slowmode
  32. !unmute
  33. !clear_num
  34. !playlist Shows the songs in the playlist
  35. !next Makes me jump to the next song in the queue
  36. !add name_of_the_music Adds a new song in the queue
  37. !join Makes me join your current voice channel
  38. !stop Makes me stop playing music
  39. !join makes me join your current voice channel
  40. !record starts a recording
RAW Paste Data

If you have been around on Discord for a bit, chances are you have seen these special messages, often sent by bots.They can have a colored border, embedded images, text fields, and other fancy properties.

In the following section, we will explain how to compose an embed, send it, and what you need to be aware of while doing so.

# Embed preview

Here is an example of how an embed may look. We will go over embed construction in the next part of this guide.

Some description here
Some value here
Some value here
Some value here
Some value here
Some footer text here 01/01/2018

# Using the embed constructor

discord.js features the MessageEmbed(opens new window) utility class for easy construction and manipulation of embeds.

TIP

You don't need to include all the elements showcased above. If you want a simpler embed, leave some out.

The .setColor() method accepts an integer, HEX color string, an array of RGB values or specific color strings. You can find a list of them at the discord.js documentation(opens new window).

.addBlankField() was a convenience method to add a spacer to the embed. To add a blank field you can now use .addField('u200b', 'u200b') instead.

The above example chains the manipulating methods to the newly created MessageEmbed object.If you want to modify the embed based on conditions, you will need to reference it as the constant exampleEmbed (for our example).

# Attaching images

You can use the .attachFiles() method to upload images alongside your embed and use them as source for embed fields that support image urls. The method accepts the source file as file path FileOptions(opens new window), BufferResolvable (including a URL to an external image), or Attachment objects inside an array.

You can then reference and use the images inside the embed itself with attachment://fileName.extension.

TIP

If you plan to attach the same image repeatedly, consider hosting it online and providing the URL in the respective embed field instead. This also makes your bot respond faster since it doesn't need to upload the image with every response depending on it.

WARNING

If the images don't display inside the embed but outside of it, double-check your syntax to make sure it's as shown above.

# Using an embed object

TIP

You don't need to include all the elements showcased above. If you want a simpler embed, leave some out.

If you want to modify the embed object based on conditions, you will need to reference it directly (as exampleEmbed for our example). You can then (re)assign the property values as you would with any other object.

# Attaching images

You can upload images with your embedded message and use them as source for embed fields that support image urls by constructing a MessageAttachment(opens new window) from them to send as message option alongside the embed. The attachment parameter takes a BufferResolvable or Stream including the URL to an external image.

You can then reference and use the images inside the embed itself with attachment://fileName.extension.

TIP

If you plan to attach the same image repeatedly, consider hosting it online and providing the URL in the respective embed field instead. This also makes your bot respond faster since it doesn't need to upload the image with every response depending on it.

WARNING

If the images don't display inside the embed but outside of it, double-check your syntax to make sure it's as shown above.

# Resending and editing

We will now explain how to edit embedded message content and resend a received embed.

Discord

# Resending a received embed

To forward a received embed you retrieve it from the messages embed array (message.embeds) and pass it to the MessageEmbed constructor. The constructed MessageEmbed can then be edited before sending it again.

WARNING

We deliberately create a new Embed here instead of just modifying message.embeds[0] directly to keep the cache valid. If we were not to do this, the embed in cache on the original message would diverge from what the actual embed looks like, which can result in unexpected behavior down the line!

# Editing the embedded message content

Me6 Discord Bots

To edit the content of an embed you need to pass a new MessageEmbed structure or embed object to the messages .edit() method.

If you want to build the new embed data on a previously sent embed template, make sure to read the caveats in the previous section.

# Notes

  • To display fields side-by-side, you need at least two consecutive fields set to inline
  • The timestamp will automatically adjust the timezone depending on the user's device
  • Mentions of any kind will only render correctly in field values and descriptions
  • Mentions in embeds will not trigger a notification
  • Embeds allow masked links (e.g. [Guide](https://discordjs.guide/ 'optional hovertext')), but only in description and field values

# Embed limits

Mee6 Bot For Discord Servers

There are a few limits to be aware of while planning your embeds due to the API's limitations. Here is a quick reference you can come back to:

  • Embed titles are limited to 256 characters
  • Embed descriptions are limited to 2048 characters
  • There can be up to 25 fields
  • A field's name is limited to 256 characters and its value to 1024 characters
  • The footer text is limited to 2048 characters
  • The author name is limited to 256 characters
  • The sum of all characters in an embed structure must not exceed 6000 characters
  • A bot can have one embed per message
  • A webhook can have ten embeds per message

Source: Discord API documentation(opens new window)