Facebook
From cross, 4 Years ago, written in JavaScript.
Embed
Download Paste or View Raw
Hits: 312
  1. const Discord = require('discord.js');
  2. const Jimp = require('jimp');
  3.  
  4. exports.run = (client, message, params) => {
  5.  
  6.   if(params[0]) if(params[0] === 'sunucu-ikon'){
  7.     if(!message.guild) return message.channel.send('Bu sadece sunucularda kullanılabilir.');
  8.     if(!message.guild.iconURL) return message.channel.send('Bu sunucunun ikonu yok.');
  9.  
  10.     Jimp.read(message.guild.iconURL, function (err, image){
  11.         if(err) return message.channel.send('Bir hata oluştu: ``'+err+'``\n Lütfen yapımcıya bildirin.');
  12.         image.pixelate(10).write('image.png');
  13.         setTimeout(() => {
  14.           message.channel.sendFile('image.png');
  15.         }, 500);
  16.     });
  17.     return;
  18.   }
  19.   if(message.mentions.users.first()) {
  20.       Jimp.read(message.mentions.users.first().avatarURL, function (err, image){
  21.           if(err) return message.channel.send('Bir hata oluştu: ``'+err+'``\n Lütfen yapımcıya bildirin.');
  22.           image.pixelate(10).write('image.png');
  23.           setTimeout(() => {
  24.             message.channel.sendFile('image.png');
  25.           }, 500);
  26.       });
  27.   } else{
  28.     Jimp.read(message.author.avatarURL, function (err, image){
  29.         if(err) return message.channel.send('Bir hata oluştu: ``'+err+'``\n Lütfen Yapımcıya Bildirin.');
  30.         image.pixelate(10).write('image.png');
  31.         message.channel.sendFile('image.png');
  32.     });
  33.   }
  34. };
  35.  
  36. exports.conf = {
  37.   enabled: true,
  38.   guildOnly: false,
  39.   aliases: [],
  40.   permLevel: 0
  41. };
  42. //codare
  43. exports.help = {
  44.   name: 'pixelfoto',
  45.   description: 'Avatarın renklerini ters çevirir.',
  46.   usage: 'invert [@<kişi ismi>]'
  47. };
  48.  

Replies to pixel foto rss

Title Name Language When
Re: pixel foto Hot Ostrich javascript 3 Years ago.