Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const replys_config = [{
- "message": "باك",
- "reply": "ولكم",
- "time": "3s",
- "includes": false
- },
- {
- "message": "برب",
- "reply": "تيت",
- "time": null,
- "includes": true
- },
- {
- "message": "مرحبا",
- "reply": "هلا",
- "time": "2s",
- "includes": true
- }
- ]
- /*
- "message": الرسالة,
- "reply": الرد
- "time": علشان يرد بسرعة مايكون في وقت null الوقت او اكتب
- "includes": مارح يرد البوت الا لو الرسالة بس الي انكتبت false رح يرد البوت عليه حتى لو الرسالة انكتبت بلنص او بلبداية او بلنهاية لو تخليها true لو تخليها
- */
- client.on("message", message => {
- if (message.author.bot || !message.guild) return false;
- var data = replys_config.find(reply => (message.content.includes(reply.message) && reply.includes) || (message.content == reply.message));
- if (data) {
- setTimeout(() => {
- message.channel.send(data.reply);
- }, (data.time != null ? require("ms")(data.time) : 0));
- }
- });
- //Reply Code after time By 3Mo_Steve
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement