fable.rb 424 B

123456789101112131415161718192021
  1. def fable_embed(fable, event)
  2. # Find the author, if they're a member
  3. author = event.server.member(fable.user_id)
  4. embed = Embed.new(
  5. title: fable.title,
  6. description: fable.story,
  7. )
  8. embed.image = { url: fable.url } if fable.url
  9. author_footer(embed, author, [fable.id])
  10. embed
  11. end
  12. def fable_list(fables)
  13. Embed.new(
  14. title: 'Related Fables',
  15. description: fables.map(&:title).join("\n")
  16. )
  17. end