Создал бота, но не могу сделать кнопки, для быстрого ответа боту. Помогите
C#:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VkNet;
using VkNet.Model.RequestParams;
using VkNet.Enums.Filters;
using VkNet.Model;
using VkNet.Enums.SafetyEnums;
namespace zkz
{
internal class Program
{
public static VkApi api = new VkApi();
static void Main(string[] args)
{
api.Authorize(new ApiAuthParams() { AccessToken = "Токен" });
while (true)
{
var s = api.Groups.GetLongPollServer(213123412);
var poll = api.Groups.GetBotsLongPollHistory(new BotsLongPollHistoryParams() { Server = s.Server, Ts = s.Ts, Key = s.Key, Wait = 25 });
if (poll?.Updates == null)
{
continue;
}
foreach(var a in poll.Updates)
{
if (a.Type == GroupUpdateType.MessageNew)
{
string userMessage = a.Message.Body.ToLower();
long? userId = a.Message.UserId;
if (userMessage == "приветик")
{
SendMessage("Приветик", userId);
}
}
}
}
}
public static void SendMessage(string message, long? userID)
{
Random rn = new Random();
api.Messages.Send(new MessagesSendParams
{
RandomId = rn.Next(),
UserId = userID,
Message = message
});
}
public static void Buttons()
{
}
}
}
ссылки лучше нормально оформи.