general.ping: use editedTimestamp if avaliable
This commit is contained in:
		
							parent
							
								
									a7a8b90854
								
							
						
					
					
						commit
						93b9939066
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -125,7 +125,9 @@ ping.description = "Measures response times to Discord.";
 | 
			
		|||
ping.addAlias("p");
 | 
			
		||||
ping.callback = async function (msg) {
 | 
			
		||||
  const newMsg = await msg.channel.createMessage("Pong.");
 | 
			
		||||
  const rtt = Math.floor(newMsg.timestamp - msg.timestamp);
 | 
			
		||||
  const rtt = Math.floor(
 | 
			
		||||
    newMsg.timestamp - (msg.editedTimestamp || msg.timestamp)
 | 
			
		||||
  );
 | 
			
		||||
  const gateway = hf.bot.shards.get(
 | 
			
		||||
    hf.bot.guildShardMap[hf.bot.channelGuildMap[msg.channel.id]] || 0
 | 
			
		||||
  ).latency;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue