mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Converted send message method to async (also created a synchronous method that shadows the async method). Added a method to send multiple messages at once and message truncation with a choice of strategies
This commit is contained in:
@@ -19,7 +19,7 @@ public class GetRestreamCommand : ICommand
|
||||
CancellationToken ctx)
|
||||
{
|
||||
var url = await Helpers.GetValue(BuiltIn.Keys.RestreamUrl);
|
||||
botInstance.SendChatMessage($"@{message.Author.Username}, restream URL: {url.Value}", true);
|
||||
await botInstance.SendChatMessageAsync($"@{message.Author.Username}, restream URL: {url.Value}", true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class SetRestreamCommand : ICommand
|
||||
CancellationToken ctx)
|
||||
{
|
||||
await Helpers.SetValue(BuiltIn.Keys.RestreamUrl, arguments["url"].Value);
|
||||
botInstance.SendChatMessage($"@{message.Author.Username}, updated URL", true);
|
||||
await botInstance.SendChatMessageAsync($"@{message.Author.Username}, updated URL", true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user