summaryrefslogtreecommitdiff
path: root/src/models/commands
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-29 17:37:31 -0700
committer8cy <[email protected]>2020-04-29 17:37:31 -0700
commit30f2e6293defe4fa4090a009c9a9032c695630e3 (patch)
tree96406f0483073b209d72944c3c099858b51004c5 /src/models/commands
parentadd contact cmds, qol updates/ formatting, v9.1.0 (diff)
downloaddep-core-30f2e6293defe4fa4090a009c9a9032c695630e3.tar.xz
dep-core-30f2e6293defe4fa4090a009c9a9032c695630e3.zip
The Memeification, v9.2.0
- fix goodbye - add more models - formatting - uncomment error loggers
Diffstat (limited to 'src/models/commands')
-rw-r--r--src/models/commands/AutoReply.ts17
-rw-r--r--src/models/commands/ImgurAlbum.ts43
2 files changed, 60 insertions, 0 deletions
diff --git a/src/models/commands/AutoReply.ts b/src/models/commands/AutoReply.ts
new file mode 100644
index 0000000..fbc7e46
--- /dev/null
+++ b/src/models/commands/AutoReply.ts
@@ -0,0 +1,17 @@
+// import Command from '../Command.js'
+
+// module.exports = class AutoReplyCommand extends Command {
+// constructor(client, info) {
+// super(client, info);
+
+// this.reply = info.reply || false;
+// }
+
+// run(msg, args, fromPattern) {
+// return this.reply ? msg.reply(this.generateText(fromPattern)) : msg.say(this.generateText(fromPattern));
+// }
+
+// generateText() {
+// throw new Error('The generateText method is required.');
+// }
+// }; \ No newline at end of file
diff --git a/src/models/commands/ImgurAlbum.ts b/src/models/commands/ImgurAlbum.ts
new file mode 100644
index 0000000..199c2a6
--- /dev/null
+++ b/src/models/commands/ImgurAlbum.ts
@@ -0,0 +1,43 @@
+// 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