Fix /spinbottle command
This commit is contained in:
parent
2668ab3450
commit
c601aed595
|
@ -137,8 +137,11 @@ async Task BotOnMessageReceived(ITelegramBotClient botClient, Message message) {
|
|||
break;
|
||||
case "spinbottle":
|
||||
var people = query?.Split(" ").Where(p => !string.IsNullOrWhiteSpace(p)).ToList();
|
||||
if (people == null || !people.Any())
|
||||
people = new List<string> { "Syntax error. (Can't select from zero options)" };
|
||||
if (people == null || !people.Any()) {
|
||||
await botClient.SendTextMessageAsync(message.Chat.Id, "Syntax error. (Can't select from zero options)", replyToMessageId: message.MessageId);
|
||||
break;
|
||||
}
|
||||
|
||||
await botClient.SendTextMessageAsync(message.Chat.Id, RandomOption(people).Trim() + ", truth or dare?", replyToMessageId: message.MessageId);
|
||||
break;
|
||||
case "help":
|
||||
|
|
Loading…
Reference in a new issue