tobaJK

Discord image feature

Sep 25th, 2021
829
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. +package net.sf.l2j.discord.misc;
  2. +
  3. +import net.dv8tion.jda.api.EmbedBuilder;
  4. +import net.sf.l2j.discord.actions.handlers.IDiscordHandler;
  5. +
  6. +/**
  7. + * @author Melron
  8. + */
  9. +public class DiscordTest implements IDiscordHandler
  10. +{
  11. +   @Override
  12. +   public void notify(Object... params)
  13. +   {
  14. +       EmbedBuilder test = new EmbedBuilder();
  15. +       test.setColor(0x99ccff);
  16. +       test.setTitle(String.format(":shopping_cart: melron wants to sell an item!"));
  17. +       test.setThumbnail("https://i.postimg.cc/3x3TQFC9/weapon-arcana-mace-i01.png");
  18. +       test.addField(":eye:  Item Name: ", "Arcana Mace", true);
  19. +       test.addField(":zap:  Item Enchantment: ","+9", true);
  20. +       test.addField(":dagger:  P. Atk: ","300", true);
  21. +       test.addField(":magic_wand:  M. Atk: ","235", true);
  22. +       test.addField(":knot:  Special Ability: ","Acumen", true);
  23. +       test.addField(":crossed_swords:  Item Type: ", "Blunt / One Handed", true);
  24. +       test.addField(":money_mouth:  Price: ","15GB",false);
  25. +       getChannel("test-channel").sendMessageEmbeds(test.build()).queue();
  26. +   }
  27. +}
RAW Paste Data