简体   繁体   English

如何在网站上制作 discord.js 机器人统计信息?

[英]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.

相关问题 我将如何使用 Discord.js 制作一个“主持活动”的机器人? - How would I make a bot that "host events" with Discord.js? 如何为我的 Discord.js 机器人创建奇偶命令? - How can I make an even-odd command for my Discord.js bot? 如何发出重置命令来重新启动我的 discord.js 机器人? - How can i make a reset command to restart my discord.js bot? Discord.js:我怎样才能让我的机器人打字几秒钟? - Discord.js: How can i make my bot typing for some seconds? discord.js:如何让机器人发送提及,但不在嵌入中? - discord.js: How can I make the bot send mention, but not in an embed? 如何为我的 discord.js 机器人发出禁令命令? - How can I make a ban command for my discord.js bot? Discord.js机器人程序需要帮助-如何使我的机器人每6小时自动执行一项任务而不发送命令? - Discord.js bot help needed - how can I make my bot auto do a task every 6 hours without sending it a command? 如何让 discord 机器人在 discord.js 中发送消息后有表情符号反应? - How do I make discord bot have an emoji reaction after it sends its message in discord.js? 如何使我的 discord 机器人具有自定义状态 (discord.js) - How do I make my discord bot have a custom status (discord.js) 所以我创建了一个不和谐的投票机器人。 我如何使它如此特定的角色可以使用机器人? (discord.js) - So i have created a discord poll bot. How do i make it so specific role can use the bot? (discord.js)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM