SHARE
TWEET

server.js file

bahady Feb 14th, 2020 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const http = require('http');
  2. const express = require('express');
  3. const app = express();
  4. app.get("/", (request, response) => {
  5.   response.sendStatus(200);
  6. });
  7. app.listen(process.env.PORT);
  8. setInterval(() => {
  9.   http.get(`http://projectname.glitch.me/`);
  10. }, 280000);
  11.  
  12. // كل البكجات الي ممكن تحتجها في اي بوت
  13. const { Client, RichEmbed } = require("discord.js");
  14. var { Util } = require('discord.js');
  15. const {TOKEN, YT_API_KEY, prefix, devs} = require('./config')
  16. const client = new Client({ disableEveryone: true})
  17. const ytdl = require("ytdl-core");
  18. const canvas = require("canvas");
  19. const Canvas = require("canvas");
  20. const convert = require("hh-mm-ss")
  21. const fetchVideoInfo = require("youtube-info");
  22. const botversion = require('./package.json').version;
  23. const simpleytapi = require('simple-youtube-api')
  24. const moment = require("moment");
  25. const fs = require('fs');
  26. const util = require("util")
  27. const gif = require("gif-search");
  28. const opus = require("node-opus");
  29. const ms = require("ms");
  30. const jimp = require("jimp");
  31. const { get } = require('snekfetch');
  32. const guild = require('guild');
  33. const dateFormat = require('dateformat');//npm i dateformat
  34. const YouTube = require('simple-youtube-api');
  35. const youtube = new YouTube('AIzaSyAdORXg7UZUo7sePv97JyoDqtQVi3Ll0b8');
  36. const hastebins = require('hastebin-gen');
  37. const getYoutubeID = require('get-youtube-id');
  38. const yt_api_key = "AIzaSyDeoIH0u1e72AtfpwSKKOSy3IPp2UHzqi4";
  39. const pretty = require("pretty-ms");
  40. client.login(TOKEN);
  41. const queue = new Map();
  42. var table = require('table').table
  43. const Discord = require('discord.js');
  44. client.on('ready', () => {
  45.   console.log(`Logged in as ${client.user.tag}!`);
  46. });
  47.  
  48.  
  49.  //كود للتجربة
  50.  
  51. client.on('message', message =>{
  52.   if(message.content === '$ping'){
  53. let start = Date.now(); message.channel.send('pong').then(message => {
  54. message.edit(`\`\`\`js
  55. Time taken: ${Date.now() - start} ms
  56. Discord API: ${client.ping.toFixed(0)} ms\`\`\``);
  57.   });
  58.   }
  59. });
  60.  
  61. console.log("==================================")
  62. console.log("1")
  63. console.log("2")
  64. console.log("3")
  65. console.log("=========> Bot Online <=========")
  66. console.log("========> TestBot <========")
  67. console.log("=======> Token Bot **** <=======")
  68. console.log("3")
  69. console.log("2")
  70. console.log("1")
  71. console.log("====================================")
  72. console.log("Bot Online 24/7");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top