stoiveyp / Slack.NetStandard

.NET Core package that helps with Slack interactions
MIT License
41 stars 16 forks source link

How to run test project for SlashCommandTests? #25

Closed Rap70r closed 4 years ago

Rap70r commented 4 years ago

Hello,

I downloaded the project and I need to test SlashCommandTests with my Slack app. When I run the project it opens a command line window for few seconds and it shuts down. Can you please help me run the test project for SlashCommandTests and have it listen for requests?

Thank you

stoiveyp commented 4 years ago

Hi @Rap70r, not quite sure what you're asking.

All the tests in the repo are unit tests for the project - they're written specifically for that purpose and won't work with other apps.

What result are you looking to achieve?

Rap70r commented 4 years ago

Hello stoiveyp,

Thank you so much for getting back to me. This is what I'm trying to do: I created a Slack App and integrated the app with my Slack workspace. Now I would like to send events to my C# application from a Slack channel using slash commands. Is this possible using this library? If yes, can you please give me some tips how to build a class that can listen for such Slack slash commands?

Thank you

stoiveyp commented 4 years ago

Listening for them is a regular API endpoint, you put the URL in your app config.

Once the request is being sent to your app, there's a section in the reader about using the library for slash commands that will show you how it helps.

Rap70r commented 4 years ago

Ok got it. So basically I just need to implement a rest http request handler class and point the slack app to the endpoint.