Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name": "prog",
- "permissions": "NONE",
- "restriction": "1",
- "_id": "PRIVATE",
- "actions": [
- {
- "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 }",
- "behavior": "1",
- "interpretation": "1",
- "storage": "0",
- "varName": "",
- "VTypeSelect": "0",
- "CVTypeValue": "",
- "name": "Run Script"
- },
- {
- "title": "Now Playing",
- "author": "",
- "color": "",
- "url": "",
- "authorIcon": "",
- "authorUrl": "",
- "imageUrl": "",
- "thumbUrl": "",
- "timestamp": "false",
- "debug": "false",
- "text": "",
- "year": "",
- "month": "",
- "day": "",
- "hour": "",
- "minute": "",
- "second": "",
- "storage": "1",
- "varName": "embed",
- "name": "Create Embed Message"
- },
- {
- "storage": "1",
- "varName": "embed",
- "message": "\n\n\n\n\n\n${tempVars(\"progress-bar\")}",
- "name": "Set Embed Description"
- },
- {
- "storage": "1",
- "varName": "embed",
- "message": "Wrex's Moosic",
- "footerIcon": "",
- "name": "Set Embed Footer"
- },
- {
- "storage": "1",
- "varName": "embed",
- "channel": "0",
- "varName2": "",
- "storage3": "0",
- "varName3": "",
- "iffalse": "0",
- "iffalseVal": "",
- "messageContent": "",
- "name": "Send Embed Message"
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement