add $sender variable to random response module
This commit is contained in:
parent
9271c39ce2
commit
5fb167a8d0
@ -63,6 +63,7 @@ impl EventLoop for RandomModule {
|
||||
if let Some(captures) = pattern.captures(&message.content) {
|
||||
let mut response = String::new();
|
||||
captures.expand(&rand::sample(&mut rng, &responses, 1)[0], &mut response);
|
||||
response = response.replace("$sender", &message.author.name);
|
||||
message.reply(&response);
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user