Update !ping to not mention users
This commit is contained in:
parent
e53eb8adf2
commit
0b9dc15067
13
src/main.rs
13
src/main.rs
|
@ -15,7 +15,12 @@ use serenity::{
|
|||
Args, CheckResult, CommandError, CommandOptions, CommandResult, DispatchError, Reason,
|
||||
StandardFramework,
|
||||
},
|
||||
model::{channel::Message, gateway::Ready, id::{ChannelId, UserId}, user::OnlineStatus},
|
||||
model::{
|
||||
channel::Message,
|
||||
gateway::Ready,
|
||||
id::{ChannelId, UserId},
|
||||
user::OnlineStatus,
|
||||
},
|
||||
prelude::*,
|
||||
};
|
||||
use std::collections::hash_map::DefaultHasher;
|
||||
|
@ -166,7 +171,9 @@ fn ping(ctx: &mut Context, message: &Message) -> CommandResult {
|
|||
None => return Err(CommandError("Could not get latency!".to_string())),
|
||||
};
|
||||
|
||||
let _ = message.reply(&ctx, format!("Pong! Latency: {}ms", ping));
|
||||
let _ = message
|
||||
.channel_id
|
||||
.say(&ctx, format!("Pong! Latency: {}ms", ping));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -654,7 +661,7 @@ fn pinned(ctx: &mut Context, message: &Message, mut args: Args) -> CommandResult
|
|||
}
|
||||
let target_channel = match args.single::<ChannelId>() {
|
||||
Ok(v) => v,
|
||||
Err(_) => message.channel_id
|
||||
Err(_) => message.channel_id,
|
||||
};
|
||||
let pinned = match target_channel.pins(&ctx.http) {
|
||||
Ok(v) => v,
|
||||
|
|
Loading…
Reference in New Issue