Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const axios = require('axios');
- module.exports.run = async (bot,message,args) => {
- let cc = message.content.split(';chk ')[1];
- if(!cc){
- ccs.forEach(function(cc) {
- if (ccs.length > 5) return message.channel.send(`Apenas 5 cc's por vez`)
- axios.get('#' + cc)
- .then(function(response){
- if(response.data.split(' ')[0] == '#') {
- aprovadas.push(response.data)
- if(ccs.length == aprovadas.length + reprovadas.length) {
- if(aprovadas.length > 0) {aprovada()}
- if(reprovadas.length > 0) {reprovada()}
- }
- message.channel.send({
- "embed": {
- "title": "``❗`` Informações:",
- "description": "``💳`` Insira sua lista de cartões\n\nOs separadores aceitos são: ``|`` ``,`` ``;`` ``:`` ``/``",
- "color": Math.floor(Math.random() * 16777214) + 1,
- "footer": {
- "icon_url": message.author.avatarURL,
- "text": "Pedido por "+message.author.tag
- }
- }
- });
- return;
- }
- process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
- axios.get('http://localhost/apibot.php?key=72RJD9DLT13UBNAGH4VPB6LZT&lista=' + cc)
- .then(function(response){
- message.channel.send({
- "embed": {
- "title": "``❗`` Informações:",
- "description": response.data,
- "color": Math.floor(Math.random() * 16777214) + 1,
- "footer": {
- "icon_url": message.author.avatarURL,
- "text": "Pedido por "+message.author.tag
- }
- }
- }).then(function (messagee) {
- messagee.react("🗑");
- const filter = (reaction, user) => {
- return reaction.emoji.name === '🗑' && user.id === message.author.id;
- };
- const collector = messagee.createReactionCollector(filter, { time: 15000 });
- collector.on('collect', (reaction, reactionCollector) => {
- messagee.delete();
- });
- });
- });
- }
- module.exports.help = {
- name: "chk"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement