192 lines
4.1 KiB
Go
192 lines
4.1 KiB
Go
|
package util
|
||
|
|
||
|
import (
|
||
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/locale"
|
||
|
"github.com/mymmrac/telego"
|
||
|
)
|
||
|
|
||
|
func StandardVoteKeyboard(chatID int64, loc locale.Localizer) *telego.InlineKeyboardMarkup {
|
||
|
return &telego.InlineKeyboardMarkup{
|
||
|
InlineKeyboard: [][]telego.InlineKeyboardButton{
|
||
|
{
|
||
|
{
|
||
|
Text: "0",
|
||
|
CallbackData: NewVotePayload(chatID, 0).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "0.5",
|
||
|
CallbackData: NewVotePayload(chatID, 0.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "1",
|
||
|
CallbackData: NewVotePayload(chatID, 1).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "2",
|
||
|
CallbackData: NewVotePayload(chatID, 2).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
|
||
|
{
|
||
|
Text: "3",
|
||
|
CallbackData: NewVotePayload(chatID, 3).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "5",
|
||
|
CallbackData: NewVotePayload(chatID, 5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "8",
|
||
|
CallbackData: NewVotePayload(chatID, 8).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "13",
|
||
|
CallbackData: NewVotePayload(chatID, 13).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
|
||
|
{
|
||
|
Text: "20",
|
||
|
CallbackData: NewVotePayload(chatID, 20).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "40",
|
||
|
CallbackData: NewVotePayload(chatID, 40).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "100",
|
||
|
CallbackData: NewVotePayload(chatID, 100).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "?",
|
||
|
CallbackData: NewVotePayload(chatID, 0).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: loc.Message("finish_vote"),
|
||
|
CallbackData: NewVoteFinishPayload(chatID).String(),
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func StoryPointsVoteKeyboard(chatID int64, loc locale.Localizer) *telego.InlineKeyboardMarkup {
|
||
|
return &telego.InlineKeyboardMarkup{
|
||
|
InlineKeyboard: [][]telego.InlineKeyboardButton{
|
||
|
{
|
||
|
{
|
||
|
Text: "0.5",
|
||
|
CallbackData: NewVotePayload(chatID, 0.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "1",
|
||
|
CallbackData: NewVotePayload(chatID, 1).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "1.5",
|
||
|
CallbackData: NewVotePayload(chatID, 1.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "2",
|
||
|
CallbackData: NewVotePayload(chatID, 2).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: "2.5",
|
||
|
CallbackData: NewVotePayload(chatID, 2.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "3",
|
||
|
CallbackData: NewVotePayload(chatID, 3).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "3.5",
|
||
|
CallbackData: NewVotePayload(chatID, 3.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "4",
|
||
|
CallbackData: NewVotePayload(chatID, 4).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: "4.5",
|
||
|
CallbackData: NewVotePayload(chatID, 4.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "5",
|
||
|
CallbackData: NewVotePayload(chatID, 5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "5.5",
|
||
|
CallbackData: NewVotePayload(chatID, 5.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "6",
|
||
|
CallbackData: NewVotePayload(chatID, 6).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: "6.5",
|
||
|
CallbackData: NewVotePayload(chatID, 6.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "7",
|
||
|
CallbackData: NewVotePayload(chatID, 7).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "7.5",
|
||
|
CallbackData: NewVotePayload(chatID, 7.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "8",
|
||
|
CallbackData: NewVotePayload(chatID, 8).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: "8.5",
|
||
|
CallbackData: NewVotePayload(chatID, 8.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "9",
|
||
|
CallbackData: NewVotePayload(chatID, 9).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "9.5",
|
||
|
CallbackData: NewVotePayload(chatID, 9.5).String(),
|
||
|
},
|
||
|
{
|
||
|
Text: "10",
|
||
|
CallbackData: NewVotePayload(chatID, 10).String(),
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
{
|
||
|
Text: loc.Message("finish_vote"),
|
||
|
CallbackData: NewVoteFinishPayload(chatID).String(),
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func SendRedmineKeyboard(chatID int64, result float64, loc locale.Localizer) *telego.InlineKeyboardMarkup {
|
||
|
return &telego.InlineKeyboardMarkup{
|
||
|
InlineKeyboard: [][]telego.InlineKeyboardButton{
|
||
|
{
|
||
|
{
|
||
|
Text: loc.Message("send_result_redmine"),
|
||
|
CallbackData: NewRedmineSendResultPayload(chatID, result).String(),
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|