mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	Added status command to admin.
This commit is contained in:
		
							parent
							
								
									6744faa6e6
								
							
						
					
					
						commit
						9d0caaf976
					
				
					 1 changed files with 20 additions and 0 deletions
				
			
		|  | @ -67,6 +67,26 @@ export default new Command({ | ||||||
| 						$.channel.send(`Couldn't find a verbosity level named \`${type}\`! The available types are \`[${Object.keys(logs)}]\`.`); | 						$.channel.send(`Couldn't find a verbosity level named \`${type}\`! The available types are \`[${Object.keys(logs)}]\`.`); | ||||||
| 				} | 				} | ||||||
| 			}) | 			}) | ||||||
|  | 		}), | ||||||
|  | 		status: new Command({ | ||||||
|  | 			description: "Changes the bot's status.", | ||||||
|  | 			permission: Command.PERMISSIONS.BOT_SUPPORT, | ||||||
|  | 			async run($: CommonLibrary): Promise<any> | ||||||
|  | 			{ | ||||||
|  | 				$.channel.send('Setting status to `online`...'); | ||||||
|  | 			}, | ||||||
|  | 			any: new Command({ | ||||||
|  | 				description: `Select a status to set to. Available statuses: \`online\`, \`idle\`, \`dnd\`, \`invisible\``, | ||||||
|  | 				async run($: CommonLibrary): Promise<any> | ||||||
|  | 				{ | ||||||
|  | 					let statuses = ['online', 'idle', 'dnd', 'invisible']; | ||||||
|  | 					if (!statuses.includes($.args[0])) return $.channel.send("That status doesn't exist!"); | ||||||
|  | 					else { | ||||||
|  | 						$.client.user?.setStatus($.args[0]); | ||||||
|  | 						$.channel.send(`Setting status to \`${$.args[0]}\`...`); | ||||||
|  | 					} | ||||||
|  | 				} | ||||||
|  | 			}) | ||||||
| 		}) | 		}) | ||||||
| 	} | 	} | ||||||
| }); | }); | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue