Documentation ¶
Index ¶
- Variables
- func AddSlapSticker(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func AddSlapStickerToDb(fileID string) error
- func AddSlapToDB(slapString string)
- func BatchSave(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func DadJoke(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func DelTag(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func DeleteNote(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func DeleteSlapFromDb(documentID string) error
- func DeleteSlapString(bot *tgbotapi.BotAPI, update *tgbotapi.Update, documentID string)
- func ExtractTag(message string) string
- func GenerateUUID() string
- func GetAllTags(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func GetMessage(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func GetNotes(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func GetSlapStickers() (string, error)
- func GetSlapStrings() (string, error)
- func InitReminderService(bot *tgbotapi.BotAPI)
- func MakePDF(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func ParseDate(inputString string) (time.Time, error)
- func Pin(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Remind(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func SaveNote(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Search(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Sed(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func SendMessage(message string)
- func ShowSlapStrings(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Slap(user1 string, user2 string) string
- func SlapWithSticker(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Timer(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- func Unpin(bot *tgbotapi.BotAPI, update *tgbotapi.Update)
- type BatchSaveType
- type SlapSticker
- type SlapString
Constants ¶
This section is empty.
Variables ¶
var DATABASE_URI = os.Getenv("DATABASE_URI")
Functions ¶
func AddSlapSticker ¶
AddSlapSticker adds slap sticker to db
func AddSlapStickerToDb ¶
AddSlapStickerToDb Adds a slap string to database
func AddSlapToDB ¶
func AddSlapToDB(slapString string)
AddSlapToDB adds a slap string format to the mongodb database
func DeleteNote ¶
DeleteNote deletes a note
func DeleteSlapFromDb ¶
DeleteSlapFromDb removes a slap string with a given ID from the database
func DeleteSlapString ¶
DeleteSlapString deletes a slap string from database
func GetMessage ¶
GetMessage gets message from the bot and replies to the user
func GetSlapStickers ¶
GetSlapStickers gets a random slap sticker from document
func GetSlapStrings ¶
GetSlapStrings gets a random slap string from document
func InitReminderService ¶
func ShowSlapStrings ¶
ShowSlapStrings returns widgets showing all slap strings and giving user an option to delete any
func SlapWithSticker ¶
SlapWithSticker slaps a person with a sticker
Types ¶
type BatchSaveType ¶
type BatchSaveType struct {
Data data
}
func (*BatchSaveType) Continue ¶
func (b *BatchSaveType) Continue(bot *tgbotapi.BotAPI, update *tgbotapi.Update, session *middleware.UserSession)
Continue function adds the document to the session
func (*BatchSaveType) Done ¶
func (b *BatchSaveType) Done(bot *tgbotapi.BotAPI, update *tgbotapi.Update, session *middleware.UserSession)
Done saves the notes and then indexes them all
type SlapSticker ¶
type SlapSticker struct { ID primitive.ObjectID `bson:"_id,omitempty"` FileID string `bson:"fileid,omitempty"` }
SlapSticker denotes a sticker in the database
type SlapString ¶
type SlapString struct { ID primitive.ObjectID `bson:"_id,omitempty"` Text string `bson:"text,omitempty"` }
SlapString is this
func GetAllSlapStrings ¶
func GetAllSlapStrings() ([]SlapString, error)
GetAllSlapStrings returns a list of all the slap documents