Skip to content

x-contract/Microsoft-Bot-DirectLine-DiscordApp-C-

Repository files navigation

Microsoft Bot Direct Line-DiscordApp-CSharp

The sample of Discord app interactive with Microsoft Bot Framework.

This project can receive text message from DiscordApp and redirect message to Microsoft Bot Framework by Direct Line interface. Correspondingly, it also retrieve response message from Microsoft Bot Framework and passthrough to DiscordApp. By deploying binary of this project, you can add a chat bot that created by Microsoft Bot Framework for DiscordApp.

Add a chat bot in DiscordApp

To achieve this, please follow this article: Making a Ping-Pong Bot. Finally, you will get APP BOT TOKEN from below UI:

Enable Bot Direct Line for a Bot

The Bot Direct Line is a set of public REST API that can help developers send/receive messages to/from backend Bot Framework service. To enable direct line feature for a bot, you have to follow below article: Connect a bot to Direct Line

When finshed above steps, you will get BotId and Direct Line Secret key from setting UI:

Configuration

This application has only one configuration file with name appsettings.json which is under application folder. In this file, you need to set values of DiscordBotSecret(APP BOT TOKEN), DirectlineSecret(Direct Line Secret Key) and BotId.

Running application

This application depends on .NET Core 2.0. Please install .NET Core 2.0 runtime before start application.

Application start command in application folder:

dotnet DiscordBotDirectline.dll

When application start successfully, the chat bot will display online status.

Reference:

About

The sample of DiscordApp with Microsoft bot framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages