"duck" when duck count is 1, "ducks" otherwise

This commit is contained in:
jesopo 2019-06-12 22:36:26 +01:00
parent 2d449691a8
commit f336cecb06

View file

@ -68,8 +68,11 @@ class Module(ModuleManager.BaseModule):
seconds = round(time.time()-duck_timestamp, 2)
return "%s %s a duck in %s seconds! You've %s %d ducks in %s!" % (
user.nickname, action, seconds, action, action_count, channel.name)
ducks_plural = "duck" if action_acount == 1 else "ducks"
return "%s %s a duck in %s seconds! You've %s %d %s in %s!" % (
user.nickname, action, seconds, action, action_count, ducks_plural,
channel.name)
def _no_duck(self, channel, user, stderr):
if channel.get_setting("ducks-kick"):