mirror of
https://git.klmp200.net/ALFRED/ALFRED.git
synced 2025-01-18 10:36:44 +01:00
Fix empty gender
This commit is contained in:
parent
747e58099e
commit
68f6e1ffa0
@ -2,7 +2,7 @@
|
|||||||
* @Author: Bartuccio Antoine
|
* @Author: Bartuccio Antoine
|
||||||
* @Date: 2018-07-24 14:55:33
|
* @Date: 2018-07-24 14:55:33
|
||||||
* @Last Modified by: klmp200
|
* @Last Modified by: klmp200
|
||||||
* @Last Modified time: 2018-07-25 01:05:08
|
* @Last Modified time: 2018-07-25 01:29:53
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package commands
|
package commands
|
||||||
@ -24,6 +24,10 @@ func SetGender(m *tb.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
data := strings.Join(split, " ")
|
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.Users.Set(m.Sender.Username, "gender", data)
|
||||||
shared.Bot.Send(m.Chat, "Votre genre est enregistré, je vous considère maintenant comme « "+data+" ».")
|
shared.Bot.Send(m.Chat, "Votre genre est enregistré, je vous considère maintenant comme « "+data+" ».")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user