Disable self challenging
This commit is contained in:
parent
d9ed7bd501
commit
1c41a201a8
@ -773,6 +773,9 @@ fn challenge(
|
|||||||
if let Err(e) = check_idle(&fight.status) {
|
if let Err(e) = check_idle(&fight.status) {
|
||||||
return Err(e);
|
return Err(e);
|
||||||
}
|
}
|
||||||
|
if arguments[0] == prefix.nick {
|
||||||
|
return Err("you can't challenge yourself nigga.".to_owned())
|
||||||
|
}
|
||||||
|
|
||||||
fight.status = FightStatus::WaitingWho;
|
fight.status = FightStatus::WaitingWho;
|
||||||
fight.channel = channel.to_owned();
|
fight.channel = channel.to_owned();
|
||||||
|
Loading…
Reference in New Issue
Block a user