From bb511abc03bb66848947e37a999502b813c77269 Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Thu, 23 Jul 2020 23:24:17 -0700 Subject: goodbye old uwufier :cry: --- src/models/commands/ImgurAlbum.ts | 43 --------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/models/commands/ImgurAlbum.ts (limited to 'src/models/commands/ImgurAlbum.ts') diff --git a/src/models/commands/ImgurAlbum.ts b/src/models/commands/ImgurAlbum.ts deleted file mode 100644 index 199c2a6..0000000 --- a/src/models/commands/ImgurAlbum.ts +++ /dev/null @@ -1,43 +0,0 @@ -// import request from 'node-superfetch'; -// import Command from '../Command.js' -// const { IMGUR_KEY } = process.env; - -// module.exports = class ImgurAlbumCommand extends Command { -// constructor(client, info) { -// super(client, info); - -// this.albumID = info.albumID; -// this.cache = null; -// this.credit.push({ -// name: 'Imgur', -// url: 'https://imgur.com/', -// reason: 'API', -// reasonURL: 'https://apidocs.imgur.com/' -// }); -// } - -// async run(msg, { user }) { -// try { -// const image = await this.random(); -// if (!image) return msg.reply('This album has no images...'); -// return msg.say(this.generateText(msg, user), { files: [image] }); -// } catch (err) { -// return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); -// } -// } - -// generateText() { -// throw new Error('The generateText method is required.'); -// } - -// async random() { -// if (this.cache) return this.cache[Math.floor(Math.random() * this.cache.length)]; -// const { body } = await request -// .get(`https://api.imgur.com/3/album/${this.albumID}`) -// .set({ Authorization: `Client-ID ${IMGUR_KEY}` }); -// if (!body.data.images.length) return null; -// this.cache = body.data.images.map(image => image.link); -// setTimeout(() => { this.cache = null; }, 3.6e+6); -// return body.data.images[Math.floor(Math.random() * body.data.images.length)].link; -// } -// }; \ No newline at end of file -- cgit v1.2.3