- adding GetButtonByValue to ButtonForm
This commit is contained in:
parent
37ef30ebee
commit
321bd7c0ff
@ -124,6 +124,16 @@ namespace TelegramBotBase.Form
|
|||||||
return ikb;
|
return ikb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the first Button with the given value.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public ButtonBase GetButtonByValue(String value)
|
||||||
|
{
|
||||||
|
return this.ToList().Where(a => a.Value == value).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
public static implicit operator InlineKeyboardMarkup(ButtonForm form)
|
public static implicit operator InlineKeyboardMarkup(ButtonForm form)
|
||||||
{
|
{
|
||||||
if (form == null)
|
if (form == null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user