Created
March 14, 2021 19:32
-
-
Save phaticusthiccy/4974efdf751c57101021ab1137bdb394 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Codded by @phaticusthiccy | |
Telegram: t.me/phaticusthiccy | |
Instagram: www.instagram.com/kyrie.baran | |
*/ | |
const Asena = require('../events'); | |
const {MessageType} = require('@adiwajshing/baileys'); | |
const con = require('../config'); | |
// Descriptions | |
const TRZAR = "Rastgele zar atar." | |
const ENZAR = "Roll dice randomly." | |
const HIZAR = "पासा के यादृच्छिक रोल" | |
// Sentences | |
const TRSEN = "🍀 ```Zar Atılıyor!``` 🎲" | |
const ENSEN = "🍀 ```Rolling Dice!``` 🎲" | |
const HISEN = "🍀 ```पासा फेंको!``` 🎲" | |
// Results | |
const TRSON = "```Zar Atıldı:``` " | |
const ENSON = "```Dice Rolled:``` " | |
const HISON = "```पासा लुढ़का:``` " | |
// Plugin Start | |
if (con.LANG === 'TR' || 'az') { | |
if (con.WORKTYPE === 'private') { | |
Asena.addCommand({pattern: 'roll', fromMe: true, desc: TRZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, TRSEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, TRSON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
else if (con.WORKTYPE === 'public') { | |
Asena.addCommand({pattern: 'roll', fromMe: false, desc: TRZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, TRSEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, TRSON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
} | |
else if (con.LANG === 'HI') { | |
if (con.WORKTYPE === 'private') { | |
Asena.addCommand({pattern: 'roll', fromMe: true, desc: HIZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, HISEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, HISON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
else if (con.WORKTYPE === 'public') { | |
Asena.addCommand({pattern: 'roll', fromMe: false, desc: HIZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, HISEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, HISON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
} | |
else { | |
if (con.WORKTYPE === 'private') { | |
Asena.addCommand({pattern: 'roll', fromMe: true, desc: ENZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, ENSEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, ENSON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
else if (con.WORKTYPE === 'public') { | |
Asena.addCommand({pattern: 'roll', fromMe: false, desc: ENZAR}, (async (message, match) => { | |
await message.client.sendMessage(message.jid, ENSEN, MessageType.text); | |
await new Promise(r => setTimeout(r, 4000)); | |
// Numbers | |
var r_text = new Array (); | |
r_text[0] = "🎲 *1* 🎲"; | |
r_text[1] = "🎲 *2* 🎲"; | |
r_text[2] = "🎲 *3* 🎲"; | |
r_text[3] = "🎲 *4* 🎲"; | |
r_text[4] = "🎲 *5* 🎲"; | |
r_text[5] = "🎲 *6* 🎲"; | |
var i = Math.floor(6*Math.random()) | |
await message.client.sendMessage(message.jid, ENSON + `${r_text[i]}`, MessageType.text); | |
})); | |
} | |
} |
Asifsifu
commented
Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment