mirror of
				https://github.com/aydenjahola/discord-multipurpose-bot.git
				synced 2025-11-04 00:01:41 +00:00 
			
		
		
		
	include true or false questions in the trivia using their api
This commit is contained in:
		
							parent
							
								
									9b94d52c76
								
							
						
					
					
						commit
						d3ac6fad8d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -29,7 +29,7 @@ module.exports = {
 | 
				
			||||||
      if (!triviaQuestion || Date.now() - lastApiCall >= API_INTERVAL) {
 | 
					      if (!triviaQuestion || Date.now() - lastApiCall >= API_INTERVAL) {
 | 
				
			||||||
        // Fetch a new trivia question from OTDB
 | 
					        // Fetch a new trivia question from OTDB
 | 
				
			||||||
        const response = await axios.get(
 | 
					        const response = await axios.get(
 | 
				
			||||||
          "https://opentdb.com/api.php?amount=1&category=15&type=multiple" // Category 15 is for Video Games
 | 
					          "https://opentdb.com/api.php?amount=1&category=15" // Category 15 is for Video Games
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        triviaQuestion = response.data.results[0];
 | 
					        triviaQuestion = response.data.results[0];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue