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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The 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.