snekfetch 4.0.0

This commit is contained in:
Daniel Odendahl Jr
2018-02-26 22:10:01 +00:00
parent a4767134e5
commit 9aaf21913b
22 changed files with 45 additions and 40 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ module.exports = class DoomsdayClockCommand extends Command {
async run(msg) {
try {
const { text } = await snekfetch.get('https://thebulletin.org/timeline');
const { raw } = await snekfetch.get('https://thebulletin.org/timeline');
const text = raw.toString();
const time = text.match(/IT IS (.+) MINUTES TO MIDNIGHT/)[0];
const desc = text.match(/<div class="body-text"><span class="timeline-year">(.+)<\/span>: (.+)<\/div>/);
return msg.say(stripIndents`