Skip to content

paladique/AzureSample-SpaceyBot

Repository files navigation

SpaceyBot

A bot built with the Bot Framework Composer.

Building with the SDK? Check out this bot sample!

What it does

Prompts the user and displays a random image from NASA's Astronomy Picture of the Day open API. Options in Bot Framework Composer have generated this bot in C#.

Instructions

  1. Install the Bot Framework Composer

  2. Clone/download this repo.

  3. Open the Bot Framework Composer, select "Open" and open the folder you cloned/downloaded.

  4. Go to the NASA API Site and fill out the form to receive an API key to your email.

  5. Replace the api key placeholder with the NASA api key that has been generated for you.

    • replacing the api key placeholder in bot framework composer
  6. Select "Start Bot" at the top right of the composer. You can test the bot in the Composer with web chat, or install and use the Bot Emulator to test it.

    • options for running a bot in the bot framework composer

Running the code

Options in Bot Framework Composer have generated this bot in C# and can be ran and tested with the Bot Emulator.

  1. Open this cloned/downloaded folder in VS Code
    1. Or you can navigate to the folder in your favorite command line tool
  2. Install the Bot Emulator.
  3. Open the terminal and run the following command: dotnet run --project .\azuresample_spaceybot.csproj
  4. If you see a few status messages in your terminal, the bot is running successfully!
  5. Make note of this message and copy the link: Now listening on: http://localhost:#### (#### will be a set of 4 numbers)
  6. Open the Bot Emulator, select "Open Bot" and paste the copied link from the last step into the "Bot URL" text box
  7. Add /api/messages to the end of the pasted link so it reads: http://localhost:####/api/messages
  8. Select Connect to start the bot

setting up a bot in the bot framework emulator

Refer to this documentation if you are feeling lost!

Read more

About

A bot created with the Bot Framework Composer that displays a random spacey image from NASA

Topics

Resources

License

Stars

Watchers

Forks