fixed restart cmd
This commit is contained in:
		
							parent
							
								
									492cdba631
								
							
						
					
					
						commit
						d6cb0e3c78
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -7,9 +7,13 @@ class RestartCommand extends Command {
 | 
			
		|||
      this.success = false;
 | 
			
		||||
      return "Only the bot owner can restart me!";
 | 
			
		||||
    }
 | 
			
		||||
    await this.channel.createMessage(Object.assign({
 | 
			
		||||
      content: "mrmBot is restarting."
 | 
			
		||||
    }, this.reference));
 | 
			
		||||
    const content = {
 | 
			
		||||
      body: "mrmBot is restarting",
 | 
			
		||||
      msgtype: "m.text",
 | 
			
		||||
    };
 | 
			
		||||
    matrixClient.sendEvent(this.channel, "m.room.message", content, "", (err, res) => {
 | 
			
		||||
      console.log(err);
 | 
			
		||||
    });
 | 
			
		||||
    process.exit(1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue