Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Autoreply
- client.on(Events.MessageCreate, async (message) => {
- const autoreply = require("./Schemas.js/autoreply");
- const replyData = await autoreply.findOne({
- Guild: message.guild.id,
- })
- if (replyData) {
- if (message.content.toLowerCase().includes(replyData.Keyword)) {
- await message.reply({ content: `${replyData.Reply}` });
- } else if (message.content.includes(replyData.Keyword)) {
- await message.reply({ content: `${replyData.Reply}` });
- } else if (message.content.toUpperCase().includes(replyData.Keyword)) {
- await message.reply({ content: `${replyData.Reply}` });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment