[英]How I can make discord.js bot statistics on website?
I have one short and probably easy question.我有一个简短且可能很简单的问题。 So - how can I import bot stats to my website?
那么-如何将机器人统计信息导入我的网站?
Mainly I mean the number of:主要是指的数量:
• users ( ${client.users.cache.size}
), • 用户(
${client.users.cache.size}
),
• guilds ( ${client.guilds.cache.size}
) • 公会(
${client.guilds.cache.size}
)
• channels ( ${client.channels.cache.size}
). • 频道(
${client.channels.cache.size}
)。
I know that it can be done in a simple way on the basis of "information exchange" between files, but they must be for 1 VPS - I do not have such a possibility, unfortunately.我知道它可以在文件之间的“信息交换”的基础上以简单的方式完成,但它们必须是 1 VPS - 不幸的是,我没有这种可能性。 Is there any other way?
还有其他方法吗? If so, how can I do it?
如果是这样,我该怎么做? (If someone already knows how to do it, I would like to ask for a "more" description of this issue, because I had no contact with the "information exchange" between the website and the bot)
(如果有人已经知道怎么做,我想要求对此问题进行“更多”描述,因为我没有接触过网站和机器人之间的“信息交换”)
You can make a REST Api for your bot that gives these stats to some API endpoint, and then request that API from your website using fetch. You can make a REST Api for your bot that gives these stats to some API endpoint, and then request that API from your website using fetch.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.