Guias

How to make a Discord Bot – Gambling!








We are no longer helping with bot coding. I am currently in college and no longer have time to help or make videos, and my helpers have lives too so they arent available much either. If you are really interested in making discord bots I suggest you go watch some JavaScript tutorials and read the discord.js documentation. Thank you for all the support over the last couple years. It really means a lot to me. Im not saying this is the end of my youtube or coding careers, in fact I know it isnt, but for now we say farewell.

Keep in mind that you dont need the discord.js module at the top. I thought we were gonna use and embed but I decided not too.

► Follow me!
• My Twitter –

► Create your own intros & outros!
• Panzoid –

Subscribe for more videos!

THANKS FOR WATCHING! 😀

Link do Vídeo






19 Comentários

  1. when i gamble a number over what I have in my wallet, it just takes me into the negatives. Any help?

  2. Hey can you do a tutorial for drop, lets say every 10 min there drops a peach in a server and the user can use it. And they can gamble it. So its a gamble but with diffrent "currency" xD

  3. const Discord = require("discord.js");

    const money = require("../money.json");

    const fs = require("fs");

    module.exports.run = async (bot, message, args) => {

    var maxBet = 2

    if(!money[message.author.id] || money[message.author.id].money <= 0) return message.reply("you don't have any money.");

    if(!args[0]) return message.reply("please specify a bet.");

    try {

    var bet = parseFloat(args[0]);

    } catch {

    return message.reply("you can only enter whole numbers.");

    }

    if(bet != Math.floor(bet)) return message.reply("you can only enter whole numbers.");

    if(money[message.author.id].money < bet) return message.reply("you don't have that much money.");

    if(bet > maxBet) return message.reply(`the maximum bet is ${maxBet.toLocaleString()}.`);

    let chances = ["win", "lose"]

    var pick = chances[Math.floor(Math.random() * chances.length)]

    if(pick === "lose") {

    money[message.author.id].money -= bet;

    fs.writeFile("./money.json", JSON.stringify(money), (err) => {

    if(err) console.log(err);

    });

    return message.reply(`you lose. New Balance: ${money[message.author.id].money}`);

    } else {

    money[message.author.id].money += bet;

    fs.writeFile("./money.json", JSON.stringify(money), (err) => {

    if(err) console.log(err);

    });

    return message.reply(`you win! New Balance: ${money[message.author.id].money}`);

    }

    }

    module.exports.help = {

    name: "gamble",

    aliases: ["p"]

    }

  4. Please make a tutorial on how to make a buy command and buy items from a shop 🙏🏾!! Really needed so my members can actually use their money for something. Thanks in advance 😁

  5. You should make more economy commands that can help users earn more money. Great videos! 👏🏼 👏🏼 👏🏼 keep up 🌟

Comentários estão fechados.