Skip to content
This repository was archived by the owner on Nov 10, 2022. It is now read-only.

chatbot-workshop/kotlin-slack-hello

Repository files navigation

Hello Bot

Build Status

A very simple bot example for Slack written in Kotlin.

Copyright © 2017 Marcus Fihlon

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Preparation

  1. Go to https://my.slack.com/services/new/bot and create a new bot.

  2. Write down the name of your bot and the auth token.

  3. Clone this repository: git clone https://github.com/chatbot-workshop/kotlin-slack-hello.git

Configuration

Open the file src/main/resources/bot.conf and enter the name of the bot, the auth token and the name of the channel, the bot should listen at in the corresponding lines.

Running

Run the bot within your IDE or use Gradle at the command line: ./gradlew run

Testing

  1. Open Slack and login using your credentials

  2. Go to the channel your bot is listening at

  3. Send a message directly to your bot (use @botName with the name of your bot)

  4. You should receive an answer saying Hello, your name with your name

About

A simple bot example to post a message to Slack written in Kotlin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages