我在 HTML 中创建了这个 Javascript,我的朋友已经托管了它。它工作得很好,所以我假设它与代码无关:
var deaths = [
"with a potato.",
"by using a truck and running them over.",
"with a gun, bang bang.",
"by stuffing a mouldy lemon in their mouth.",
"by throwing multiple knives at them.",
"by throwing them off a building onto a cactus.",
"by tying them up and forgetting about them.",
"by using mind control and making them walk into lava."
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
//"",
];
var death = deaths[Math.floor(Math.random() * deaths.length)];
document.write(death)
我正在为 nightbot 和 twitch tv 制作一个命令,并在命令中从上面的 javascipt 制作的网页中提取文本。我$(customapi URL)
在命令中使用它和网站 url,它表示 URL,但是当命令运行时,它返回“[API 必须返回少于 400 个字符]”。