firefox approx user-agent command cause why not
This commit is contained in:
		
							parent
							
								
									9939b7a0c9
								
							
						
					
					
						commit
						af018b7947
					
				
					 2 changed files with 12 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								src/modules/misc/firefox.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/modules/misc/firefox.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					const Command = require("#lib/command.js");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const firefox = new Command("firefox");
 | 
				
			||||||
 | 
					firefox.category = "misc";
 | 
				
			||||||
 | 
					firefox.helpText = "Get the approximate latest Firefox user-agent";
 | 
				
			||||||
 | 
					firefox.callback = function (msg, line) {
 | 
				
			||||||
 | 
					  const now = Math.floor(Date.now() / 1000);
 | 
				
			||||||
 | 
					  const version = 124 + (now - 1710892800) / 2419200;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return `Mozilla/5.0 (X11; Linux x86_64; rv:${version}.0) Gecko/20100101 Firefox/${version}.0`;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					hf.registerCommand(firefox);
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ const roll = new Command("roll");
 | 
				
			||||||
roll.category = "misc";
 | 
					roll.category = "misc";
 | 
				
			||||||
roll.helpText = "Roll a dice";
 | 
					roll.helpText = "Roll a dice";
 | 
				
			||||||
roll.usage = "<sides>";
 | 
					roll.usage = "<sides>";
 | 
				
			||||||
roll.addAlias("img");
 | 
					 | 
				
			||||||
roll.callback = function (msg, line) {
 | 
					roll.callback = function (msg, line) {
 | 
				
			||||||
  if (line == null || line == "") line = 6;
 | 
					  if (line == null || line == "") line = 6;
 | 
				
			||||||
  line = Number(line);
 | 
					  line = Number(line);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue