Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const broSchema = require("./Schemas.js/brocount")
- client.on("messageCreate", async (message) => {
- const { author, content } = message;
- const dataBro = await broSchema.findOne({
- User: author.id,
- })
- if (content.includes("Bro") || content.includes("bro")) {
- if (dataBro) {
- dataBro.Count++;
- dataBro.save();
- } else {
- await broSchema.create({
- User: author.id,
- Count: 1,
- })
- }
- } else {
- return;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment