admin管理员组文章数量:1025251
I want to code a discord bot with the discord.js ... But in the documentation, I don't found a function to count the number of messages in a channel of each user... Is there a function to use the searchbar with filters like an user?
I want to code a discord bot with the discord.js ... But in the documentation, I don't found a function to count the number of messages in a channel of each user... Is there a function to use the searchbar with filters like an user?
Share Improve this question asked Apr 14, 2019 at 8:30 itrangeritranger 1852 gold badges2 silver badges15 bronze badges2 Answers
Reset to default 2The search is not ( yet ) avaible for Bots.
You could Channel#fetchMessages
but this would be very Api intensive.
Best way would be to get a database and increment it when the user sends a message, but that will only count messages when the bot is running.
The above works. But if you did not implement the feature into the bot. One way is to do a search using in: channel(whatever channel you want) and it will show you the result count which is technically the message count in that channel. Hope it helped.
I want to code a discord bot with the discord.js ... But in the documentation, I don't found a function to count the number of messages in a channel of each user... Is there a function to use the searchbar with filters like an user?
I want to code a discord bot with the discord.js ... But in the documentation, I don't found a function to count the number of messages in a channel of each user... Is there a function to use the searchbar with filters like an user?
Share Improve this question asked Apr 14, 2019 at 8:30 itrangeritranger 1852 gold badges2 silver badges15 bronze badges2 Answers
Reset to default 2The search is not ( yet ) avaible for Bots.
You could Channel#fetchMessages
but this would be very Api intensive.
Best way would be to get a database and increment it when the user sends a message, but that will only count messages when the bot is running.
The above works. But if you did not implement the feature into the bot. One way is to do a search using in: channel(whatever channel you want) and it will show you the result count which is technically the message count in that channel. Hope it helped.
本文标签: javascriptHow can I count the number of messages in one channel of each userStack Overflow
版权声明:本文标题:javascript - How can I count the number of messages in one channel of each user? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745614662a2159214.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论