2022-01-14 03:43:27 +00:00
|
|
|
package interact
|
|
|
|
|
2022-01-19 05:07:25 +00:00
|
|
|
type Button struct {
|
|
|
|
Text string
|
|
|
|
Name string
|
|
|
|
Value string
|
|
|
|
}
|
|
|
|
|
2022-01-14 03:43:27 +00:00
|
|
|
type Reply interface {
|
2022-01-19 05:07:25 +00:00
|
|
|
// Send sends the message directly to the client's session
|
2022-01-14 18:52:46 +00:00
|
|
|
Send(message string)
|
2022-01-19 05:07:25 +00:00
|
|
|
|
|
|
|
// Message sets the message to the reply
|
2022-01-14 03:43:27 +00:00
|
|
|
Message(message string)
|
2022-01-19 05:07:25 +00:00
|
|
|
|
|
|
|
// AddButton adds the button to the reply
|
|
|
|
AddButton(text string, name, value string)
|
|
|
|
|
2022-01-20 16:01:22 +00:00
|
|
|
RequireTextInput(title, message string, textFields ...TextField)
|
|
|
|
|
2022-01-19 05:07:25 +00:00
|
|
|
// RemoveKeyboard hides the keyboard from the client user interface
|
2022-01-14 03:43:27 +00:00
|
|
|
RemoveKeyboard()
|
|
|
|
}
|
2022-01-19 05:07:25 +00:00
|
|
|
|
|
|
|
// ButtonReply can be used if your reply needs button user interface.
|
|
|
|
type ButtonReply interface {
|
|
|
|
// AddButton adds the button to the reply
|
|
|
|
AddButton(text string)
|
|
|
|
}
|
|
|
|
|
|
|
|
// DialogReply can be used if your reply needs Dialog user interface
|
|
|
|
type DialogReply interface {
|
|
|
|
// AddButton adds the button to the reply
|
|
|
|
Dialog(title, text string, buttons []string)
|
|
|
|
}
|