Fix empty gender
the build was successful Details

This commit is contained in:
Antoine Bartuccio 2018-07-25 01:30:13 +02:00
parent 747e58099e
commit 68f6e1ffa0
Signed by: klmp200
GPG Key ID: E7245548C53F904B
1 changed files with 5 additions and 1 deletions

View File

@ -2,7 +2,7 @@
* @Author: Bartuccio Antoine
* @Date: 2018-07-24 14:55:33
* @Last Modified by: klmp200
* @Last Modified time: 2018-07-25 01:05:08
* @Last Modified time: 2018-07-25 01:29:53
*/
package commands
@ -24,6 +24,10 @@ func SetGender(m *tb.Message) {
return
}
data := strings.Join(split, " ")
if data == "" {
shared.Bot.Send(m.Chat, "Attention, votre genre est vide. Ce n'est pas enregistrable.")
return
}
shared.Users.Set(m.Sender.Username, "gender", data)
shared.Bot.Send(m.Chat, "Votre genre est enregistré, je vous considère maintenant comme « "+data+" ».")
}