diff options
| author | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-07-23 23:24:17 -0700 |
| commit | bb511abc03bb66848947e37a999502b813c77269 (patch) | |
| tree | 612c010fc8317e1cdf11471a18aad0270819d33e /src/models/commands/ImgurAlbum.ts | |
| parent | fix: if clear amount equal or over 100, round down to 99 (diff) | |
| download | dep-core-bb511abc03bb66848947e37a999502b813c77269.tar.xz dep-core-bb511abc03bb66848947e37a999502b813c77269.zip | |
goodbye old uwufier :cry:
Diffstat (limited to 'src/models/commands/ImgurAlbum.ts')
| -rw-r--r-- | src/models/commands/ImgurAlbum.ts | 43 |
1 files changed, 0 insertions, 43 deletions
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 |