Skip to content
Snippets Groups Projects
Commit bd5af9a6 authored by Stephen D's avatar Stephen D
Browse files

don't reply multiple times

parent 380eaac3
No related branches found
No related tags found
No related merge requests found
Pipeline #5781 passed
......@@ -118,8 +118,15 @@ impl LlamaHandler {
.map(|chunk| chunk.collect())
.collect();
let mut first = true;
for chunk in chunks {
let res = msg.reply(ctx, chunk).await;
let res = if first {
msg.reply(ctx, chunk).await
} else {
msg.channel_id.send_message(ctx, |m| m.content(chunk)).await
};
first = false;
match res {
Ok(x) => {
self.contexts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment