12345678910111213141516171819202122232425 |
- import request from "request-promise-native";
- import { ICommand } from "./command";
- import { Message } from "discord.js";
- async function inspire(msg: Message) {
- let result = await request("https://inspirobot.me/api?generate=true");
- msg.channel.send(`${msg.author.toString()} Here is a piece of my wisdom:`, {
- files: [ result ]
- });
- }
- export default {
- commands: [{
- pattern: "inspire me",
- action: msg => {
- inspire(msg);
- }
- }],
- documentation: {
- "inspire me": {
- auth: false,
- description: "Generates an inspiring quote just for you"
- }
- }
- } as ICommand;
|