Documentation ¶
Index ¶
- Constants
- Variables
- func EventHandler(c *gin.Context)
- func GetQuestion() (models.Question, error)
- func HandleTextMessage(user *models.User, message *string)
- func SendMessage(msg *models.OutgoingMessage)
- func SendTextMessageToUser(user *models.User, textMessage *models.TextMessage)
- func VerificationHandler(c *gin.Context)
Constants ¶
View Source
const EMOJI_CAT_ANGRY = string(128574)
View Source
const EMOJI_CAT_BODY = string(128008)
View Source
const EMOJI_CAT_CRYING = string(128575)
View Source
const EMOJI_CAT_FACE = string(128049)
View Source
const EMOJI_CAT_GRINNING = string(128568)
View Source
const EMOJI_CAT_HEART_EYES = string(128571)
View Source
const EMOJI_CAT_KISSING = string(128573)
View Source
const EMOJI_CAT_LAUGHING = string(128569)
View Source
const EMOJI_CAT_SCARED = string(128576)
View Source
const EMOJI_CAT_SMILING = string(128570)
View Source
const EMOJI_CAT_WRY_SMILE = string(128572)
View Source
const MESSAGE_API_PROBLEM = "I'm sorry I cannot handle your request right now. There is some problem with our questions API. " + EMOJI_CAT_SCARED
View Source
const MESSAGE_BYE = "Bye! Come back again soon! " + EMOJI_CAT_KISSING
View Source
const MESSAGE_CORRECT_ANSWER = "That's right! Meow meow! " + EMOJI_CAT_HEART_EYES + "\n%s is the correct answer!\nYour score increased by 2 points.\n\nDo you want me to ask you another question?\n\nA ) Yes\nB ) No"
View Source
const MESSAGE_INCORRECT_ANSWER = "That's incorrect! Meeooww. " + EMOJI_CAT_WRY_SMILE + "\n%s is the correct answer!\nYour score decreased by 1 point. " + EMOJI_CAT_CRYING + "\n\nDo you want me to ask you another question?\n\nA ) Yes\nB ) No"
View Source
const MESSAGE_INVALID_ANSWER = "That is not a valid response. " + EMOJI_CAT_ANGRY + " Please choose a letter from A-%c."
View Source
const MESSAGE_NEGATIVE_SCORE = "Your current score is %d. LMAO noob! " + EMOJI_CAT_LAUGHING
View Source
const MESSAGE_POSITIVE_SCORE = "Your current score is %d. Nice! " + EMOJI_CAT_GRINNING
View Source
const MESSAGE_WANT_QUESTION = "Meow meow! " + EMOJI_CAT_SMILING + " Do you want me to ask you a question?\n\nA ) Yes\nB ) No"
Variables ¶
View Source
var QUERY_URL string = "https://graph.facebook.com/v2.6/me/messages?access_token=" + config.ACCESS_TOKEN
View Source
var QUESTION_API_URL string = "https://opentdb.com/api.php?amount=1"
Functions ¶
func EventHandler ¶
func GetQuestion ¶
func HandleTextMessage ¶
func SendMessage ¶
func SendMessage(msg *models.OutgoingMessage)
func SendTextMessageToUser ¶
func SendTextMessageToUser(user *models.User, textMessage *models.TextMessage)
func VerificationHandler ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.