forked from lavender/watch-party
		
	add /shrug command
This commit is contained in:
		
							parent
							
								
									eae224e3d5
								
							
						
					
					
						commit
						2c992d49f0
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		|  | @ -153,13 +153,23 @@ const setupChatboxEvents = (socket) => { | ||||||
|             printChatMessage("set-time", "/sync", "b57fdc", syncMessageContent); |             printChatMessage("set-time", "/sync", "b57fdc", syncMessageContent); | ||||||
|             handled = true; |             handled = true; | ||||||
|             break; |             break; | ||||||
|  |           case "/shrug": | ||||||
|  |             socket.send( | ||||||
|  |               JSON.stringify({ | ||||||
|  |                 op: "ChatMessage", | ||||||
|  |                 data: `${args} ¯\\_(ツ)_/¯`.trim(), | ||||||
|  |               }) | ||||||
|  |             ); | ||||||
|  |             handled = true; | ||||||
|  |             break; | ||||||
|           case "/help": |           case "/help": | ||||||
|             const helpMessageContent = document.createElement("span"); |             const helpMessageContent = document.createElement("span"); | ||||||
|             helpMessageContent.innerHTML = |             helpMessageContent.innerHTML = | ||||||
|               "Available commands:<br>" + |               "Available commands:<br>" + | ||||||
|               " <code>/help</code> - display this help message<br>" + |               " <code>/help</code> - display this help message<br>" + | ||||||
|               " <code>/ping [message]</code> - ping all viewers<br>" + |               " <code>/ping [message]</code> - ping all viewers<br>" + | ||||||
|               " <code>/sync</code> - resyncs you with other viewers"; |               " <code>/sync</code> - resyncs you with other viewers<br>" + | ||||||
|  |               " <code>/shrug</code> - appends ¯\\_(ツ)_/¯ to your message"; | ||||||
| 
 | 
 | ||||||
|             printChatMessage( |             printChatMessage( | ||||||
|               "command-message", |               "command-message", | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue