Gamble All Option


I have recently installed PhantomBot because I really wanted a bot I could customize to my needs. It is working perfectly fine but I am dissapointed a bit I don’t have the Gamble All option in the gambling system. My viewers are used to other streams where they Gamble All for the funs and not being able to give it to them is kind of dissapointing. Can you advice if you have a new module which activates that feature?
Lord Dem


Can you clarify exactly what you mean by “gamble all?” PhantomBot has a slot machine and basic gambling module by default, you can read more about them here.


Hi based on the documentation the Gambling module has:


  • !gamblesetmax [points] - Set the maximum bet
  • !gamblesetmin [points] - Set the maximum bet
  • !gamblesetwinningrange [number_between_0_and_100] - Set the winning range.
  • !gamblesetgainpercent [value] - Set the gain percent on win.

The viewer needs to enter a command and amount to gamble like !gamble 100
but he cannot simply put !gamble all to gamble all their points


That is about what I thought you meant, but I didn’t want to assume. I’ll mark this post as a feature request and we’ll see about adding support for it. It should be relatively simple to add.


Thank you so much. I love so much the customization of the bot and the availability of all the modules for editing to suit the streamer. Really a great job! No complaints at all!


If all is more than maximum, should it default to maximum? It is plausible that a person has more points than the max and gamble all would just return an error saying that it is above the maximum.


There is certainly an appeal to saying ALL IN. Sometimes you just feel LUCKY.

(and then you’re back to saving up Tacos, if you’re in my stream!)


People like to gamble ALL their points meaning really ALL their points for the funs and then call the system rigged when they lose. It creates laughs and memes in the chat. For sure it will be an excellent addition. Even a module change would be nice without a full version of phantombot. I don’t think would be hard to implement.


Right, it would need to be an option then, especially because some channels take the maximum points to bet seriously. If there was a way to circumvent that, it would create friction with some broadcasters.


I will take for example how StreamElements Gamble option works.
Viewers get rewarded with Points (same as Phantombot)
Viewers can gamble Percentage of their points (which is the actual percentage of their total points) a number of their points or gamble all to go all in for the funs then meme in the chat that the system is rigged if they lose them all. You could add an option gamble max and gamble all. He who goes all in is his head on the plate :slight_smile: . I think is a rational request.


I agree it is rational, it is also rational that different broadcasters have different preferences, hence why a configurable option is the most rational decision and, if accepted, would be part of the user story. We do our best to try to fit the needs of many, and we also provide the source code so that folks can, of course, tweak the bot to their particular need.



Hi I completely agree. The Main Reason I chose PhantomBot is because its code is open for editing by the user which makes the Bot even stronger! I am using a lot of its capabilities and haven’t even touched the surface. I wish I was efficient enough to implement this myself :slight_smile: If its a matter of adding just a small bunch of code in my current gambling.js module I would happily do it if someone could point me to what I would need to do. I have altered other code to change command names and responses but not really efficient in .js coding :sob::sob::sob::sob:


Here is what I changed in “gambling.js” to enable the “!gamble all” function… You can find this portion of the code starting at line 62 in the current stable version of PhantomBot.

 * @commandpath gamble [amount] - Gamble your points.
if (command.equalsIgnoreCase('gamble')) {
	//edit: get user points for !gamble all
	if (action == "all") {
		action = $.getUserPoints(sender);
	} else {
		if (!parseInt(action)) {
			$.say($.whisperPrefix(sender) + $.lang.get('gambling.usage'));

	gamble(sender, parseInt(action));

Basically, it checks if the argument sent after “gamble” is “all” and if so, it gets the user’s current points.

There could be many ways to achieve this, so this may not necessarily be the best way, but it’s short and it works well.

I hope this can be useful to you.


Keep in mind that this still doesn’t bypass the max check in gamble(). Be sure to set the maximum bet to a very high value to prevent an error. For example, by default, the maximum is 100. If someone has more than that, they will receive an error.



Thanks! Works perfect for what I needed it!


had the same issue a month ago.

No need to change any code.

i made a command
!addcom !gambleall (command gamble) (points)

it worked perfect for me.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.