System.ArgumentNullException: Value cannot be null.
Parameter name: uriString
at Slackbot.SocketConnection.TryConnect()
at Slackbot.SocketConnection.Connect()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__7_1(Object state)
at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.QueueUserWorkItemCallback.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
var bot = new Bot(name, token);
bot.OnMessage += (sender, message) =>
{
if (message.MentionedUsers.Any(m => m == name))
bot.SendMessage(message.Channel, $"Hi {message.User}, thanks for mentioning my name!");
};
I running it on .NET Core 2.1 (04e15494b6), the Slackbot library version is 1.4.1.