Documentation ¶
Index ¶
- Constants
- func ChoiceMaker(choices []string) string
- func DecisionMaker() bool
- func DownloadFile(filepath string, url string) error
- func FileToLines(filePath string) ([]string, error)
- func Notifier(reminder Reminder) string
- func NowWeather(city string) string
- func ProcessCmd(command string, commandArgs string, userID int64) string
- func ProcessMsg(message string, userID int64) string
- func Search(query string, image bool) string
- func StartBot()
- func ToEnglish(text string) string
- func UpdateConfig(pattern string, withStr string) error
- func WriteStringToFile(path string, text string, overwrite bool) error
- type CoinPrice
- type Config
- type Reminder
- type Result
Constants ¶
View Source
const ( KISS = "😘" HEART = "💕" TONGUE = "😋" UNHAPPY = "😐" SILENT = "😶" HUH = "🌚" HII = "🙃" SWEAT = "😓" SURPRISE = "😮" )
Emojis
Variables ¶
This section is empty.
Functions ¶
func ChoiceMaker ¶
ChoiceMaker : Select a random item from a slice
func DecisionMaker ¶
func DecisionMaker() bool
DecisionMaker : decide if a a reply is needed, randomly
func DownloadFile ¶
DownloadFile : Download a url to a local file. It's efficient because it will write as it downloads and not load the whole file into memory.
func FileToLines ¶
FileToLines : Read lines from a text file
func NowWeather ¶
NowWeather : Current weather info from his/her city
func ProcessCmd ¶
ProcessCmd : handles bot commands
func ProcessMsg ¶
ProcessMsg : handles chat messages
func UpdateConfig ¶
UpdateConfig : Grep a line and replace it with a given string
Types ¶
type Config ¶
type Config struct { GFID int64 BFID int64 Token string GFName string BFName string CSE string HerCity string HisCity string MemDay string MemdayGreetings string Birthday string HuobiAccessKey string HuobiSecretKey string }
Config : Read config info from text file
var InitConfig Config
InitConfig : cache config data
type Reminder ¶
type Reminder struct {
// contains filtered or unexported fields
}
Reminder type for reminders data
type Result ¶
type Result struct { Position int64 Result *customsearch.Result }
Result : CSE search result type
Click to show internal directories.
Click to hide internal directories.