I don't give a damn 'bout my reputation

This commit is contained in:
LinlyBoi
2022-08-06 23:16:21 +02:00
parent 193864eacf
commit 1f510814a5

View File

@@ -15,12 +15,12 @@ impl EventHandler for Handler {
// Event handlers are dispatched through a threadpool, and so multiple // Event handlers are dispatched through a threadpool, and so multiple
// events can be dispatched simultaneously. // events can be dispatched simultaneously.
async fn message(&self, ctx: Context, msg: Message) { async fn message(&self, ctx: Context, msg: Message) {
if msg.content == "hello" { if msg.content == "!ping" {
// Sending a message can fail, due to a network error, an // Sending a message can fail, due to a network error, an
// authentication error, or lack of permissions to post in the // authentication error, or lack of permissions to post in the
// channel, so log to stdout when some error happens, with a // channel, so log to stdout when some error happens, with a
// description of it. // description of it.
if let Err(why) = msg.channel_id.say(&ctx.http, "https://www.nohello.com/").await { if let Err(why) = msg.channel_id.say(&ctx.http, "Pong!").await {
println!("Error sending message: {:?}", why); println!("Error sending message: {:?}", why);
} }
} }