text: const fetch = require('node-fetch');
  const HttpProxyAgent = require('https-proxy-agent');
  var fs = require("fs");
  let MessageID="911159979715756032";
  let messageID2="936899793802907649";
  let messageID3="932949310914588734";
  let messageID4="935796807647264818"
  let ip='127.0.0.1';   
  let port='7777';
  let token=[
  'mfa.JaIbMXMxCN8ppKIlUgHMpQV5rBAqnQfiJF7Ttk2DUjHKVlpxgxBgmMI_ssMyplFOLRtheHKuI_jJxwy3EAnv',
  'mfa.ApBqNbrZ_WyDTeSCiPueb7enZdoi8SZT8tCU6FzfeZG9GRMtuT6vEoZ_nTfvDkdbdZB6uSeqkcaBLyPleSyZ',
  'mfa.iJGKkV44AsN419VFh1eTDI-u9hUHNnrXOxuT8UVegJUGt6prg056AdAfd5TwYjfQwy7UJtFwyZ81X-DdDvv2',
  'mfa.LX61M7P0Ro1fZmseL9lGe7x8ddBLtTL7O6hEGWWDQeq6B4pFaRreCdFwefkNtpL1dDa8vCvBME_VxXlkkUq2',
  'mfa.PyPEpfbw04vtD0FqREs4iPirxRsVOTBwn3GqpvrqeMcTfPZr5y7MepWsAdh5_l4QUTTYWdc6Ki2jb6Zay0wE',
  'mfa.g5DuxiY2tSrPnNWEWz6Cqq13qphqtNPIoJuwxS_NYLAJJ_WCOvnJ-zwtVYqXeweIqEBrHSFV1dSmxGldZK_j',
  'mfa.fw4lPovNvcNxCrtMIx5oR2s-c4Zru-yXv72lMpsH3cFYgarzd3ISMAOzw0wtdW2autlAdtT6fTf633WHybUl',
  'mfa.04_xmaFTQjCh8zd_d9V7TNQpL-7nkKrILmMBK9Jk68XoH_j69FL6qNVebO5NzD1Y_h52bBTzwNzwPaoKCEjW',
  'mfa.it7VfdvCynDGSqGbpUpx8-poTJmXiEQmzqmfXAoqHkorChVOudGMk1HGpJGbk2TImJF03S2zqlwnK2CfIjvW',
  'mfa.4br21r9qlW7Auia-NwM0HzG5kTAgetc1tE5XJT_a_vfHoqo2LKvb1Efj3UEZHIXInoMe5MciB4Wlj8-ye2n0',
  'mfa.ar9OWxeSMaJ-OmXxtGwIjz4VYGod_I1K60BZahDIPPydQLICaaAfo56OXi6LJwS6LpCd2Pw6JW4Yvyyif80z',
  'mfa.cytsyhJ6s8ldOZlLXEJ5UX2SWEXSjzUGSw9OfilpCCKAMzUAieciVYEBQjYsWZm5bDCKxyU20Uqqip09-Idv',
  'mfa.KPig2AbSqI9RvdjJGQO5Vw6BbPTY3Vc6CVQ5egtcN-4aVFAl6LPAKrABTE3z2-J0o1f3_ZGAglu7sDDZ3udT',
  'mfa.GuLVOFUM_A38MzCJIsUj8fvnIWBZbPBxH2SKOxPx05iHBXDaf4SWY-dfCwxDk9ceCskFivEVpzE7NhiJGSYg',
  'mfa.O-X3YFvkoCfTN0gpoIlfyMqhuuDNcuOLlwyIXycKj5KvZ23QWBmQHGrJOgfxxk4w2c9bRYrXo5DhxvcESg7b',
  'mfa.RCmiIttNUWAJ774X0v5Ladu4j6vwGcLQgWcQogZTxrmW3e9WdZYsfOp9Gqz8m_e2C_lPNz8fpFHX8IjuQsPC',
  'mfa.Wv5Ntlxbp-EDQbjvekeFdXCQXSInbrQCZ2BgTT-2bI7tXd-iK65FK67B3ftAzRazazAlQMKB4KrtE0RdNu4u',
  ]
  var data = fs.readFileSync("msg.txt",'utf-8');
  let msg=data.split("\n");
  
  var dataen = fs.readFileSync("msgen.txt",'utf-8');
  let msgen=dataen.split("\n");
  
  var datafrench = fs.readFileSync("msgfrench.txt",'utf-8');
  let msgfrench=datafrench.split("\n");
  
  let messID=300;
  setInterval(async () =>{
  for(let i=0;i<token.length;i++){
       Message("!rank",messageID4,token[i]);
  }
  }, 30000);
  
  // setInterval(async () =>{
  //     for(let i=0;i<token.length;i++){
  //       messID++;
  //       if(messID>msg.length-1){
  //         messID=0;
  //       }
  //       await  Message(msg[messID],MessageID,token[i]);  
  //       await  Message(msgen[messID],messageID2,token[i]);
  //       await  Message(msgfrench[messID],messageID3,token[i]);
  //     }
  // }, 30000);
  
  
  async function Message(message,MessageID,usertoken) {
      try {
       await   fetch(`https://discord.com/api/v9/channels/${MessageID}/messages`, {
              body: JSON.stringify({
                  'content': message,
              }),
              method: "POST",
              headers: {
                  "Host": "discord.com",
                  "user-agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Mobile Safari/537.36",
                  "Content-Type": "application/json; charset=UTF-8",
                  "authorization": usertoken,
              },
              agent: new HttpProxyAgent("http://" + ip + ":" + port) 
          }).then(resp => resp.json()).then(response => {
            if (response.message == "401: Unauthorized") {
                console.log(`${response.code} | Invalid token provided`)
            } else if (response.message == "404: Not Found") {
                console.log(`${response.code} | Couldn't found message's ID.`)
            } else if (response.message == "Missing Access") {
                console.log(`${response.code} | Something went wrong token missing access.`)
            } else if (response.code == 50007) {
                console.log("50007: Cannot send messages to this user")
            } else if (response.code == 20028) {
                console.log(`Discord rate limit: ${response.retry_after}`)
            } else if (response.type == 0) {
                issend=false;
                console.log(`${response.code}\nDate: ${response.timestamp}\nMessage: ${response.content}`)
            }
        })
    } catch (e) {
        console.log(e)
    }
  }
  
  