我在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制作一个命令,一个用于抽搐电视的机器人,并且在命令中它从上面的javascipt制作的网页中提取文本。我在命令中使用此$(customapi URL)
,其中网址为URL,但是当命令运行时,它返回'[API必须返回少于400个字符]'。