Girl in a jacket

Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
nullman nullman nullman nullman nullman
slots komutu

discord.js nullman Yazar, 0 Yorum , 698 Okuma
slots komutu
#1
Kod:
import * as Discord from "discord.js"
import {emoji, config} from "../config"
import * as AsciiTable from "ascii-table"

export const preless = async (client, message, args, db) => {

let görev = db.get(`${message.author.id}.görevler.1`)
if(görev) {
              db.delete(`${message.author.id}.görevler.1`)
              db.add(`${message.author.id}.coin`, görev)
          }
          let coin = db.get(`${message.author.id}.coin`)
    function hata(msg) {
       
    let emb = new Discord.MessageEmbed()
    .setColor(config.hatarenk)
    .setAuthor(message.author.username,message.author.avatarURL())
    .setDescription(`${emoji.no} ${msg}`)
    emb.setFooter(config.footer)
    message.channel.send(emb).then(a => a.delete({timeout:5000}))
    }
    let miktar = args[0]
if(!coin) return hata(`Coininiz bulunmamaktadır!`)
    if(!miktar) return hata(`Bir **miktar** belirtmelisin!`)
    if(isNaN(miktar)) return hata(`Miktar **harf** içermemeli!`)
    if(miktar < 100) return hata(`En az **100** coin bahis koyabilirsin!`)
    if(miktar > 50000) return hata(`En fazla **50.000** coin bahis koyabilirsin!`)
    if(miktar > coin) return hata(`Girmek istediğin bahis kadar **coin** bulunmamakta!`)

var slots = [ "?", "?", "?", "?", "?", "?", "?", "?" ]
var slot1 = slots[Math.floor(Math.random() * slots.length)];
var slot2 = slots[Math.floor(Math.random() * slots.length)];
var slot3 = slots[Math.floor(Math.random() * slots.length)];
var slot4 = slots[Math.floor(Math.random() * slots.length)];
var slot5 = slots[Math.floor(Math.random() * slots.length)];
var slot6 = slots[Math.floor(Math.random() * slots.length)];
var tabl1 = new AsciiTable('Preless Slots')
tabl1.addRow("", "", "")
tabl1.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])
tabl1.addRow(slot4, slot5, slot6, "⏎")
tabl1.addRow(slot1, slot4, slot5)
    tabl1.removeBorder()
var tabl = new AsciiTable('Preless Slots')
tabl.addRow("", "", "")

tabl.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])
tabl.addRow(slot1, slot5, slot6, "⏎")
            tabl.addRow(slot2, slot5, slot6)
            tabl.removeBorder()
var tablee = new AsciiTable('Preless Slots')
tablee.addRow("", "", "")
tablee.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])
tablee.addRow(slot1, slot2, slot6, "⏎")
tablee.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])

                    tablee.removeBorder()
var table = new AsciiTable('Preless Slots')
table.addRow("", "", "")
table.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])

table.addRow(slot1, slot2, slot3, "⏎")
table.addRow(slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)], slots[Math.floor(Math.random() * slots.length)])

table.removeBorder()
    message.channel.send(`\`\`\`${tabl1}\`\`\``).then(msg => {
        setTimeout(() => {
            msg.edit(`\`\`\`${tabl}\`\`\``)
        }, 2000)
        setTimeout(() => {
            msg.edit(`\`\`\`${tablee}\`\`\``)
        }, 4000)
setTimeout(() => {

   
    if (slot1 === slot2 && slot2 === slot3) {
        db.add(`${message.author.id}.coin`, miktar * 3)
         msg.edit(`\`\`\`${table}\`\`\`
         **${miktar * 3}** coin kazandın`);
    }else if(slot1 === slot2 || slot2 === slot3 || slot1 === slot3) {
        db.add(`${message.author.id}.coin`, miktar * 2)
        msg.edit(`\`\`\`${table}\`\`\`
       **${miktar * 2}** coin kazandın`);   
    }else {
        db.add(`${message.author.id}.coin`, -miktar)
        msg.edit(`\`\`\`${table}\`\`\`
        **${miktar}** coin kaybettin`);   
  }
},6000)
})
}
export const ek = {
    komut: "slots",
    aciklama: "Slots oyunu oynarsınız",
    kategori:"eğlence",
    bakim:false
}
bu kod typescript içindir!!
Bul
Cevapla
Konuyu Okuyanlar: 1 Ziyaretçi


Hızlı Menü: