Facebook
From ByMayFe, 3 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 284
  1. const Discord = require('discord.js');
  2. const shorten = require('isgd');
  3.  
  4. exports.run = (client, message, args, tools) => {
  5.     message.delete();
  6.     if (!args[0]) return message.channel.send(' ``` \n » Kullanım: !kısalt <URL> <isim> \n » Örnek: !kısalt www.youtube.com/c/CODARE ``` ')
  7.  
  8.     if(!args[1]) {
  9.  
  10.         shorten.shorten(args[0], function(res) {
  11.             if (res.startsWith('Hata:')) message.channel.send('**Lütfen dogru URL adresi giriniz.**');
  12.  
  13.             message.channel.send(`**<${res}>**`);
  14.         })
  15.     } else {
  16.         shorten.custom(args[0], args[1], function(res) {
  17.  
  18.             if (res.startsWith('Hata:')) message.channel.send(`**<${res}>**`);
  19.  
  20.             message.channel.send(`**<${res}>**`);
  21.         })
  22.     }
  23.  
  24. };
  25.  
  26. exports.conf = {
  27.  enabled: true,
  28.  guildOnly: false,
  29.  aliases: [],
  30.  permLevel: 0
  31. };
  32.  
  33. exports.help = {
  34.  name: 'kısalt',
  35.  description: 'İstediğiniz URLni Kısaltır. ',
  36.  usage: 'kısalt'
  37. };