@jeremyblood/

DIVINE LIST

Nodejs

No description

fork
loading
Files
  • index.js
  • config.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const Discord = require("discord.js");
const client = new Discord.Client();

////$('.position', '#position').text()
//=> position

//$('ul .pear').attr('class')
//=> pear

//$('li[class=orange]').html()
//=> Orange
var request = require('request'); 
var cheerio = require('cheerio');  

$ = cheerio.load('li', 'ul', '//*[@id="sort_on"]/tbody');


var page_title = $('#title').text();
console.log(page_title);

request('https://site--jeremyblood.repl.co', function(err, resp, body) {
        if (err)
                throw err;
        //$ = cheerio.load(body);
				$('.position', '#position').text()
        console.log(body);
});

$('input[type="text"]').val()
//=> input_text

$('input[type="text"]').val('test').html()
//=> <input type="text" value="test"/>

client.on("ready", () => {
  console.log("I am ready!");
});

// Set the prefix
const prefix = "!";
client.on("message", (message) => {
  // Exit and stop if it's not there
  if (!message.content.startsWith(prefix)) return;
 
  if (message.content.startsWith(prefix + "ping")) {
    message.channel.send("pong!");
  } else
  if (message.content.startsWith(prefix + "foo")) {
    message.channel.send("bar!");
  }
});

client.login('NDk5OTkxNzczMjc2NTM2ODYy.Dt1JRA.GVeun90NmINixHWPiibaWQ_qc8I');

//https://wfts.su/clans/na/-Divine-/members

519429115397275658
node v10.16.0