23 lines
712 B
JavaScript
23 lines
712 B
JavaScript
let snoowrap = require("snoowrap")
|
||
|
||
let reddit = new snoowrap({
|
||
userAgent: "bot with big boobs",
|
||
clientId: process.env.REDDIT_CLIENT_ID,
|
||
clientSecret: process.env.REDDIT_CLIENT_SECRET,
|
||
refreshToken: process.env.REDDIT_REFRESH_TOKEN
|
||
})
|
||
|
||
module.exports = class extends Akairo.Command {
|
||
constructor() {
|
||
super("drid", {
|
||
aliases: ["drid"],
|
||
description: "@’s Drid and posts a funny meme from reddit. (also spams his dms)",
|
||
typing: true
|
||
})
|
||
}
|
||
async exec(message, args) {
|
||
let memes = await reddit.getTop("Okbuddyretard")
|
||
let randomMeme = memes[ Math.floor( Math.random() * memes.length ) ]
|
||
await message.channel.send(`<@177171660531695617>`, new Discord.MessageAttachment(randomMeme.url))
|
||
}
|
||
} |