app.rb 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. def new_app_embed(user_name, color = nil)
  2. desc = "Hi, #{user_name},\nI see you'd like to start a new character" +
  3. " application!\nI'll send you instructions in a dm!"
  4. embed = Embed.new(
  5. title: "New Appliction!",
  6. description: desc
  7. )
  8. embed.color = color if color
  9. embed
  10. end
  11. def new_app_dm(user_name, code, color = nil)
  12. embed = Embed.new(
  13. title: "Hi, #{user_name}",
  14. description: "If you have any questions, feel free to ask a Guildmaster!",
  15. footer: {
  16. text: "If you cannot copy your key, press the #{Emoji::PHONE}"
  17. },
  18. fields: [
  19. { name: "Please start your application here:", value: Url::CHAR },
  20. { name: "Your key is:", value: code }
  21. ]
  22. )
  23. embed.color = color if color
  24. embed
  25. end
  26. def edit_app_embed(user_name, char_name, color = nil)
  27. embed = Embed.new(
  28. title: "You want to edit #{char_name}?",
  29. description: "Good news, #{user_name}! I'll dm you a link"
  30. )
  31. embed.color = color if color
  32. embed
  33. end
  34. def edit_app_dm(char_name, edit_url, color = nil)
  35. embed = Embed.new(
  36. title: "You may edit #{char_name} here:",
  37. description: edit_url
  38. )
  39. embed.color = color if color
  40. embed
  41. end
  42. def app_not_found_embed(user_name, char_name)
  43. Embed.new(
  44. title: "I'm sorry, #{user_name}",
  45. description: "I can't seem to find your character named, #{char_name}",
  46. color: ERROR,
  47. fields: [
  48. {
  49. name: "Want to start a new application?",
  50. value: "You can start one with this command:\n```pkmn-app```"
  51. }
  52. ]
  53. )
  54. end