Command Line
Create a new project in the provided directory.
kogno new your_project_name
Creates the database tables needed for the framework.
This command must be executed after configuring the database in
config/database.yml
.kogno install
Kogno runs a total of 3 processes, which can be started all together or separately:
Daemon | Description |
---|---|
http | Web server that receives the events and messages from the configured platforms, in addition to the requests in the web/ folder. |
sequences | |
scheduled_messages |
kogno start
Kogno 1.0.0 server starting in development
Http: starting daemon..
Sequence: starting daemon..
Scheduled Messages: starting daemon..
Other options are:
kogno stop
, kogno restart
and kogno status
kogno http start
Other options are:
kogno http stop
, kogno http restart
and kogno http status
kogno http fg
kogno sequences start
Other options are:
kogno sequences stop
, kogno sequences restart
and kogno sequences status
kogno sequences fg
kogno scheduled_messages start
Other options are:
kogno scheduled_messages stop
, kogno scheduled_messages restart
and kogno scheduled_messages status
.kogno scheduled_messages fg
The daemons can run either in background or foreground for environments of development or production. To configure in environment, see configuration chapter.
The
console
command starts the console that lets you interact with your Kogno application from the command line. kogno console
You can also use the alias "c" to load the console:
kogno c
.kogno c
Loading development environment (Kogno 1.0.1)
2.7.0 :001 > user = User.first
=> #<User id: 1, psid: "600....>
2.7.0 :002 > puts user.first_name
Martín
=> nil
Within the console, you can run the
reload!
to restart the console quickly.runner
runs Ruby code in terminal. kogno runner "some ruby code"
kogno runner "puts User.first.first_name"
User Load (0.5ms) SELECT `users`.* FROM `users` ORDER BY `users`.`id` ASC LIMIT 1
Martín
kogno messenger menu on
Before run this command you should configure
config.messenger.persistent_menu
in config/platforms/messenger.rb
kogno messenger menu off
kogno messenger get_started on
You can change the payload editing
config.messenger.welcome_screen_payload
in the Messenger configuration file config/platforms/messenger.rb
kogno get_started off
kogno messenger greeting on
Before run this command you should configure
config.messenger.greeting
in config/platforms/messenger.rb
kogno messenger greeting off
kogno messenger update_whitelisted_domains
Before run this command, configure
config.messenger.whitelisted_domains
in config/platforms/messenger.rb
kogno messenger ice_breakers on
Before run this command, please configure
config.messenger.ice_breakers
in config/platforms/messenger.rb
kogno messenger ice_breakers off
Set and activate a url and receive incoming updates via a webhook.
kogno telegram webhook on
Before running this command, please set
config.telegram.webhook_https_server
in config/platforms/telegram.rb
file.kogno telegram webhook off
kogno telegram set_commands all
default
, all_private_chats
, all_group_chats
, all_chat_administrators
and all
kogno telegram delete_commands all
Last modified 10mo ago