Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. {
  2. "name": "prog",
  3. "permissions": "NONE",
  4. "restriction": "1",
  5. "_id": "PRIVATE",
  6. "actions": [
  7. {
  8. "code": "const TimeFormat = Actions.getWrexMods().require('hh-mm-ss');\n\n const server = msg.guild\n \n if(server && Audio.dispatchers && Audio.dispatchers[server.id]){\n // bar setup\n const maxticks = 40;\n const tickchar = '-'\n const seekpos = ':radio_button:';\n\n\n const timestamp = Audio.dispatchers[server.id].time\n const totalduration = Audio.playingnow[server.id][1].duration * 1000\n\n const readableSeek = TimeFormat.fromMs(timestamp, 'hh:mm:ss');\n const readableduration = TimeFormat.fromMs(totalduration, 'hh:mm:ss');\n\n const percentage = timestamp / totalduration;\n const progress = Math.round((maxticks * percentage));\n const emptyProgress = maxticks - progress; \n const progressText = tickchar.repeat(progress).replace(/.$/, seekpos);\n const emptyProgressText = tickchar.repeat(emptyProgress); \n\n const bar = `${readableSeek.substring(0, readableSeek.indexOf('.'))} [${progressText + emptyProgressText}] ${readableduration}`;\n\n Actions.storeValue(bar, 1 , \"progress-bar\", cache);\n Actions.callNextAction(cache);\n }",
  9. "behavior": "1",
  10. "interpretation": "1",
  11. "storage": "0",
  12. "varName": "",
  13. "VTypeSelect": "0",
  14. "CVTypeValue": "",
  15. "name": "Run Script"
  16. },
  17. {
  18. "title": "Now Playing",
  19. "author": "",
  20. "color": "",
  21. "url": "",
  22. "authorIcon": "",
  23. "authorUrl": "",
  24. "imageUrl": "",
  25. "thumbUrl": "",
  26. "timestamp": "false",
  27. "debug": "false",
  28. "text": "",
  29. "year": "",
  30. "month": "",
  31. "day": "",
  32. "hour": "",
  33. "minute": "",
  34. "second": "",
  35. "storage": "1",
  36. "varName": "embed",
  37. "name": "Create Embed Message"
  38. },
  39. {
  40. "storage": "1",
  41. "varName": "embed",
  42. "message": "\n\n\n\n\n\n${tempVars(\"progress-bar\")}",
  43. "name": "Set Embed Description"
  44. },
  45. {
  46. "storage": "1",
  47. "varName": "embed",
  48. "message": "Wrex's Moosic",
  49. "footerIcon": "",
  50. "name": "Set Embed Footer"
  51. },
  52. {
  53. "storage": "1",
  54. "varName": "embed",
  55. "channel": "0",
  56. "varName2": "",
  57. "storage3": "0",
  58. "varName3": "",
  59. "iffalse": "0",
  60. "iffalseVal": "",
  61. "messageContent": "",
  62. "name": "Send Embed Message"
  63. }
  64. ]
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement