This repository has been archived on 2022-10-14. You can view files and clone it, but cannot push or open issues/pull-requests.
melonybot/commands/drid.js

23 lines
712 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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))
}
}