From 00f2ebce48d39984565db4cf306b67abaa15c5f3 Mon Sep 17 00:00:00 2001 From: PapaSnags Date: Sun, 15 Nov 2020 21:02:35 +1100 Subject: [PATCH] Update repo.js --- source/commands/repo.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/source/commands/repo.js b/source/commands/repo.js index 6eecb85..3c9fbeb 100644 --- a/source/commands/repo.js +++ b/source/commands/repo.js @@ -47,23 +47,23 @@ exports.run = (client, message, args) =>{ { if(jsonprased[0]) { - var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`}] + var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`, date: `${jsonprased[0].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}] } if(jsonprased[1]) { - var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`}] + var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`, date: `${jsonprased[0].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`, date: `${jsonprased[1].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}] } if(jsonprased[2]) { - var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`}] + var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`, date: `${jsonprased[0].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`, date: `${jsonprased[1].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`, date: `${jsonprased[2].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}] } if(jsonprased[3]) { - var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`}, { name: `${jsonprased[3].name}`, lang: `${jsonprased[3].language}`, desc: `${jsonprased[3].description}`, star: `${jsonprased[3].stargazers_count}`, watch: `${jsonprased[3].watchers_count}`, fork: `${jsonprased[3].forks}`, issu: `${jsonprased[3].open_issues_count}`}] + var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`, date: `${jsonprased[0].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`, date: `${jsonprased[1].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`, date: `${jsonprased[2].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[3].name}`, lang: `${jsonprased[3].language}`, desc: `${jsonprased[3].description}`, star: `${jsonprased[3].stargazers_count}`, watch: `${jsonprased[3].watchers_count}`, fork: `${jsonprased[3].forks}`, issu: `${jsonprased[3].open_issues_count}`, date: `${jsonprased[3].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}] } if(jsonprased[4]) { - var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`}, { name: `${jsonprased[3].name}`, lang: `${jsonprased[3].language}`, desc: `${jsonprased[3].description}`, star: `${jsonprased[3].stargazers_count}`, watch: `${jsonprased[3].watchers_count}`, fork: `${jsonprased[3].forks}`, issu: `${jsonprased[3].open_issues_count}`}, { name: `${jsonprased[4].name}`, lang: `${jsonprased[4].language}`, desc: `${jsonprased[4].description}`, star: `${jsonprased[4].stargazers_count}`, watch: `${jsonprased[4].watchers_count}`, fork: `${jsonprased[4].forks}`, issu: `${jsonprased[4].open_issues_count}`}] + var val = [{ name: `${jsonprased[0].name}`, lang: `${jsonprased[0].language}`, desc: `${jsonprased[0].description}`, star: `${jsonprased[0].stargazers_count}`, watch: `${jsonprased[0].watchers_count}`, fork: `${jsonprased[0].forks}`, issu: `${jsonprased[0].open_issues_count}`, date: `${jsonprased[0].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[1].name}`, lang: `${jsonprased[1].language}`, desc: `${jsonprased[1].description}`, star: `${jsonprased[1].stargazers_count}`, watch: `${jsonprased[1].watchers_count}`, fork: `${jsonprased[1].forks}`, issu: `${jsonprased[1].open_issues_count}`, date: `${jsonprased[1].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[2].name}`, lang: `${jsonprased[2].language}`, desc: `${jsonprased[2].description}`, star: `${jsonprased[2].stargazers_count}`, watch: `${jsonprased[2].watchers_count}`, fork: `${jsonprased[2].forks}`, issu: `${jsonprased[2].open_issues_count}`, date: `${jsonprased[2].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[3].name}`, lang: `${jsonprased[3].language}`, desc: `${jsonprased[3].description}`, star: `${jsonprased[3].stargazers_count}`, watch: `${jsonprased[3].watchers_count}`, fork: `${jsonprased[3].forks}`, issu: `${jsonprased[3].open_issues_count}`, date: `${jsonprased[3].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}, { name: `${jsonprased[4].name}`, lang: `${jsonprased[4].language}`, desc: `${jsonprased[4].description}`, star: `${jsonprased[4].stargazers_count}`, watch: `${jsonprased[4].watchers_count}`, fork: `${jsonprased[4].forks}`, issu: `${jsonprased[4].open_issues_count}`, date: `${jsonprased[4].created_at}`.replace(/T/, ' ').replace(/\..+/, '').split(' ')[0]}] } else { @@ -88,6 +88,7 @@ exports.run = (client, message, args) =>{ .formatField('Watchers', i => i.watch, true) .formatField('Forks', i => i.fork, true) .formatField('Issues', i => i.issu, true) + .formatField('Created', i => i.date, false) @@ -108,11 +109,9 @@ exports.run = (client, message, args) =>{ await FieldsEmbed.build(); + message.channel.send("An Embed has been deleted due to inactivity") - // Will not log until the instance finished awaiting user responses - // (or techinically emitted either `expire` or `finish` event) - - } + } send() } catch (e)