discord.js从URL读取数据

时间:2018-10-26 17:30:52

标签: javascript discord discord.js

我不知道如何从url中读取数据,例如从中获取文本,例如

TabBarController > NavigationViewController > CollectionViewController

而且我想像说的那样从中读取数据

1 个答案:

答案 0 :(得分:1)

答案:

const Discord = require("discord.js");
let snekfetch = require("snekfetch")

module.exports.run = async (bot, message, args) => {
let url = "https://pastebin.com/raw/k4dEkXCz"
snekfetch.get(url).then(r => console.log(decodeURIComponent(r.body)));
}

module.exports.help = {
name: "test"
}