Open vikekh opened 7 years ago
Could you check if there is any catched exception in VS output window ?
Client.OnMessageReceived += (newMessage) =>
{
// Handle each message as you receive them
};
Is only for a message to the client, this is not all messages. The other handlers for messages are not all implemented and would have to manually implemented.
Depending on what your looking to catch. For instance the below:
client.OnPresenceChangeReceived += async (user) =>
{
// added to monitor presence changes
};
This confused me at first also. Naming issue.
I think the title describes my problem well and I do not think this is an issue with the SlackAPI lib, but rather my knowledge. I studied real-time and concurrent programming too many years ago and have very slim knowledge of the .NET implementation.
As my title says, I have a project called SlackClient which worked well when I ran it is a console app, setting up the
ManualResetEventSlim
object and SlackAPI events in theMain
method. I then decided to move everything concerning console output into its own project called App and then creating an instance ofSlackClient
and set up all events from its constructor.How ever, now no events are fired and my bot doesn't even connect when I look in my Slack team. I can see that the bot token is picked up and fed to
SlackSocketClient
.Any idea how I should solve this? Examplish code:
Also, do you have any idea how I would feed something back to console app for output?
Thank you. /Viktor