Facebook
From £lræn, 3 Years ago, written in JavaScript.
This paste is a reply to Untitled from AraShi - go back
Embed
Viewing differences between Untitled and Re: Untitled
const Discord = require("discord.js");
const shorten = require("vgd");

exports.run = (client, message, args) => {
if (!args[1]) {
            shorten.shorten(args[0], (res) => {
                if (res.startsWith("Hata:")) {
                    return message.channel.send("**Kısaltılacak link belirtilmedi**");
                }
                message.channel.send(`<${res}>`);
            });
        } else if (args[1]) {
            shorten.custom(args[0], args[1], (res) => {
                if (res.startsWith("Hata:")) {
                    return message.channel.send(`${res}`);
                }
                message.channel.send(`<${res}>`);
            });
        } else {
            return message.reply("Üzgünüm linki kısaltamadım");
        }
    }


module.exports.conf = {
  enabled: true,
  guildOnly: false,
  aliases: [],
  permLevel: 0
};

module.exports.help = {
  name: 'kısalt',
  description: '',
  usage: 'kısalt '
};