sbstjn / hanu Goto Github PK
View Code? Open in Web Editor NEWGolang Framework for writing Slack bots
Home Page: https://sbstjn.com/host-golang-slackbot-on-heroku-with-hanu.html
License: MIT License
Golang Framework for writing Slack bots
Home Page: https://sbstjn.com/host-golang-slackbot-on-heroku-with-hanu.html
License: MIT License
Hi
Can we upload files to the Slack via hanu(For ex: log files , or dummy artifacts) ? If we can, how ?
Thanks,
Let hanu
respond to @hanu help
/ help
with an automatic generated text based on all registered commands.
I want to do same thing in every message. If it is 1 word, 2 words, 3 words. I use the functions
slack.Command("word",func(conv hanu.ConversationInterface),
slack.Command("word" "word2", func(conv hanu.ConversationInterface)
slack.Command("word" "word2" "word3", func(conv hanu.ConversationInterface) respectivelty.
It continues for every number of words in a message. What is the shortest way of do this?
Thanks
Edit: the words are in the < >
Hi,
Thanks for your great work.
I'm asking for a way to handle unknown commands.
My bot is handling 2 commands as the following.
slack.Command("shout <word>", func(conv hanu.ConversationInterface) {
str, _ := conv.String("word")
fmt.Println(conv.Message().Text())
conv.Reply(strings.ToUpper(str))
})
slack.Command("your version", func(conv hanu.ConversationInterface) {
conv.Reply("Thanks for asking! I'm running `%s`", "323")
})
I want the bot to reply a message such as I don't understand your command
when someone tries to send it an undefined command. Is it possible? Something like:
slack.UnknownCommand(func(conv hanu.ConversationInterface) {
conv.Reply("Thanks for asking! But I don't understand your command.")
})
Is it possible to use conv.Reply
to send more elaborately formatted messages, or is plain text the only option?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.