Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ping pingSender = new Ping();
- PingOptions options = new PingOptions();
- options.DontFragment = true;
- byte[] buffer = Encoding.ASCII.GetBytes("ping");
- int timeout = 1200;
- PingReply reply = pingSender.Send("discordapp.com", timeout, buffer, options);
- if (reply.Status == IPStatus.Success)
- await message.Channel.SendMessageAsync("Pong! Latency is: " + reply.RoundtripTime);
- else
- await message.Channel.SendMessageAsync("Something went wrong :thinking:");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement