Skip to content

Commit 04a35be

Browse files
committed
Add ping command
1 parent 8090c4c commit 04a35be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/TiuSharpBot/Modules/MiscModule.cs

+10
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,16 @@ public async Task Leaderboard([Summary("The public code of the dream.lo leaderbo
155155
}
156156
}
157157

158+
[Command("ping")]
159+
[Summary("Displays the current latency of the bot.")]
160+
public async Task GetLatencyAsync()
161+
{
162+
var message = await ReplyAsync("ℹ️ | Pong!");
163+
await message.ModifyAsync(x =>
164+
{
165+
x.Content = $"ℹ️ | Pong! - Time taken: **{message.Timestamp - Context.Message.Timestamp:fff}ms**";
166+
});
167+
}
158168

159169
[Command("face"), Summary("Generate a face from https://thispersondoesnotexist.com/")]
160170
public async Task ThisPersonDoesNotExists() =>

0 commit comments

Comments
 (0)