-
-
Save phaticusthiccy/23e6c2cc12db52fd54ccc397b1bd4227 to your computer and use it in GitHub Desktop.
/* 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') { | |
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); | |
})); | |
} | |
} |
How to use this one?
.roll
@ #Skip to content
phaticusthiccy/Dice Game V3-2.js
Created 4 months ago β’ Report abuse
Code
Revisions 1
Stars 3
Forks 2
Dice Game V3-2.js
/* 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') {
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);
}));
}
}
@flash007k flash007k commented on 27 Mar
How to use this one?
@joewilliams007 joewilliams007 commented on 4 May
How to use this one?
.roll
Leave a comment
Β© 2021 GitHub, Inc.
Terms
Privacy
Security
Status
Docs
Contact GitHub
Pricing
API
Training
Blog
About
How to use this one?