text: const http = require("http");
  const express = require("express");
  const app = express();
  app.get("/", (request, response) => {
    response.sendStatus(200);
  });
  app.listen(process.env.PORT);
  setInterval(() => {
    http.get(`http://creditstest2.glitch.me/`);
  }, 280000);
  
  // كل البكجات الي ممكن تحتجها في اي بوت
  const { Client, RichEmbed } = require("discord.js");
  var { Util } = require("discord.js");
  const { TOKEN, YT_API_KEY, prefix, devs } = require("./config");
  const client = new Client({ disableEveryone: true });
  const ytdl = require("ytdl-core");
  const canvas = require("canvas");
  const Canvas = require("canvas");
  const convert = require("hh-mm-ss");
  const fetchVideoInfo = require("youtube-info");
  const botversion = require("./package.json").version;
  const simpleytapi = require("simple-youtube-api");
  const moment = require("moment");
  const fs = require("fs");
  const util = require("util");
  const gif = require("gif-search");
  const opus = require("node-opus");
  const ms = require("ms");
  const jimp = require("jimp");
  const { get } = require("snekfetch");
  const guild = require("guild");
  const dateFormat = require("dateformat"); //npm i dateformat
  const YouTube = require("simple-youtube-api");
  const youtube = new YouTube("AIzaSyAdORXg7UZUo7sePv97JyoDqtQVi3Ll0b8");
  const hastebins = require("hastebin-gen");
  const getYoutubeID = require("get-youtube-id");
  const yt_api_key = "AIzaSyDeoIH0u1e72AtfpwSKKOSy3IPp2UHzqi4";
  const pretty = require("pretty-ms");
  client.login(TOKEN);
  const queue = new Map();
  var table = require("table").table;
  const Discord = require("discord.js");
  client.on("ready", () => {
    console.log(`Logged in as ${client.user.tag}!`);
  });
  
  //كود للتجربة
  
  const credits = JSON.parse(fs.readFileSync("./creditsCode.json", "utf8"));
  const coolDown = new Set();
  
  client.on("message", message => {
    const args = message.content.split(" ");
    const credits = require("./creditsCode.json");
    const path = "./creditsCode.json";
    const mention =
      message.mentions.users.first() ||
      client.users.get(args[1]) ||
      message.author;
    const mentionn = message.mentions.users.first() || client.users.get(args[1]);
    const author = message.author.id;
    const balance = args[2];
    const daily = Math.floor(Math.random() * 350) + 10;
  
    if (!credits[author]) credits[author] = { credits: 50 };
    if (!credits[mention.id]) credits[mention.id] = { credits: 50 };
    fs.writeFile(path, JSON.stringify(credits, null, 5), function(err) {
      if (err) console.log(err);
    });
  
    if (message.content.startsWith(prefix + "credit")) {
      if (args[0] !== `${prefix}credit` && args[0] !== `${prefix}credits`) return;
  
      if (args[2]) {
        if (isNaN(args[2]) || args[2] < 0)
          return message.channel.send(
            `:interrobang: **| ${message.author.username}, type the credit you need to transfer! **`
          );
        if (mention.bot)
          return message.channel.send(
            `**:heavy_multiplication_x:| ${
              message.content.split(" ")[1]
            } لم يتم العثور على**`
          );
        if (mention.id === message.author.id)
          return message.channel.send(
            "**:heavy_multiplication_x:| لا يمكنك تحويل كردت لنفسك**"
          );
        if (credits[author].credits < balance)
          return message.channel.send(
            `** :thinking: | ${message.author.username}, Your balance is not enough for that!**`
          );
        var one = Math.floor(Math.random() * 9) + 1;
        var two = Math.floor(Math.random() * 9) + 1;
        var three = Math.floor(Math.random() * 9) + 1;
        var four = Math.floor(Math.random() * 9) + 1;
  
        var number = `${one}${two}${three}${four}`;
  
        message.channel
          .send(`**:heavy_dollar_sign:| \`${number}\`, أكتب الرقم للأستمرار**`)
          .then(m => {
            message.channel
              .awaitMessages(m => m.author.id === message.author.id, {
                max: 1,
                time: 10000
              })
              .then(c => {
                if (c.first().content === number) {
                  m.delete();
                  message.channel.send(
                    `**:moneybag: | ${message.author.username}, has transferred \`${balance}\` to ${mention}**`
                  );
                  credits[author].credits += -balance;
                  credits[mention.id].credits += +balance;
                  fs.writeFile(path, JSON.stringify(credits, null, 5), function(
                    err
                  ) {
                    if (err) console.log(err);
                  });
                } else if (c.first().content !== number) {
                  m.delete();
                  message.channel.send(
                    `** :money_with_wings: | تم الغاء الإرسال**`
                  );
                }
              });
          });
      }
      if (!args[2]) {
        if (mention.bot)
          return message.channel.send(
            `:interrobang:**| ${message.author.username}, I can't find** ${
              message.content.split(" ")[1]
            }**!**`
          );
        message.channel.send(
          `**${mention.username}, your :credit_card: balance is** \`$${credits[mention.id].credits}\`**.** `
        );
      }
    }
    if (args[0].toLowerCase() === `${prefix}daily`) {
      if (credits[message.author.id].daily != moment().format("L")) {
        credits[message.author.id].daily = moment().format("L");
  
        let ammount = (300, 500, 100, 200, 120, 150, 350, 320, 220, 250);
        credits[author].credits += ammount;
  
        message.channel.send(
          `**:atm: | ${message.author.username}, you received your :yen: ${ammount} daily credits!**`
        );
        fs.writeFile("./creditsCode.json", JSON.stringify(credits), function(e) {
          if (e) throw e;
        });
      } else {
        message.channel.send(
          `:stopwatch: : **Please cool down  ${moment()
            .endOf("day")
            .fromNow()}**`
        );
      }
    }
  });
  