mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	eco-bet: added a check for bet target's money
This commit is contained in:
		
							parent
							
								
									d6548c53db
								
							
						
					
					
						commit
						c71406a8d0
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -42,6 +42,8 @@ export const BetCommand = new Command({ | |||
|                         return channel.send("You must bet at least one Mon!"); | ||||
|                     else if (sender.money < amount) | ||||
|                         return channel.send("You don't have enough Mons for that.", getMoneyEmbed(author)); | ||||
|                     else if (receiver.money < amount) | ||||
|                         return channel.send("They don't have enough Mons for that.", getMoneyEmbed(target)); | ||||
| 
 | ||||
|                     return channel.send("How long until the bet ends?"); | ||||
|                 } | ||||
|  | @ -70,6 +72,8 @@ export const BetCommand = new Command({ | |||
|                             return channel.send("You must bet at least one Mon!"); | ||||
|                         else if (sender.money < amount) | ||||
|                             return channel.send("You don't have enough Mons for that.", getMoneyEmbed(author)); | ||||
|                         else if (receiver.money < amount) | ||||
|                             return channel.send("They don't have enough Mons for that.", getMoneyEmbed(target)); | ||||
| 
 | ||||
|                         // handle invalid duration
 | ||||
|                         if (duration <= 0) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue