update dependencies and add workflow for publish nuget
build nuget workflow for TelegramBotBase project / Build-TelegramBotBase (x64, linux) (push) Failing after 41s
build nuget workflow for TelegramBotBase project / Build-TelegramBotBase (x64, linux) (push) Failing after 41s
This commit is contained in:
@@ -239,8 +239,7 @@ public class DeviceSession : IDeviceSession
|
||||
text = text.MarkdownV2Escape();
|
||||
}
|
||||
|
||||
|
||||
var t = Api(a => a.SendTextMessageAsync(deviceId, text, null, parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendMessage(deviceId, text, messageThreadId: null, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -294,7 +293,7 @@ public class DeviceSession : IDeviceSession
|
||||
}
|
||||
|
||||
|
||||
var t = Api(a => a.SendTextMessageAsync(DeviceId, text, null, parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendMessage(DeviceId, text, messageThreadId: null, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -312,7 +311,7 @@ public class DeviceSession : IDeviceSession
|
||||
/// <param name="replyTo"></param>
|
||||
/// <param name="disableNotification"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Message> Send(string text, ReplyMarkupBase markup, int replyTo = 0,
|
||||
public async Task<Message> Send(string text, IReplyMarkup markup, int replyTo = 0,
|
||||
bool disableNotification = false, ParseMode parseMode = ParseMode.Markdown,
|
||||
bool markdownV2AutoEscape = true)
|
||||
{
|
||||
@@ -332,7 +331,7 @@ public class DeviceSession : IDeviceSession
|
||||
}
|
||||
|
||||
|
||||
var t = Api(a => a.SendTextMessageAsync(DeviceId, text, null, parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendMessage(DeviceId, text, messageThreadId: null, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -362,7 +361,7 @@ public class DeviceSession : IDeviceSession
|
||||
InlineKeyboardMarkup markup = buttons;
|
||||
|
||||
|
||||
var t = Api(a => a.SendPhotoAsync(DeviceId, file, null, caption, parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendPhoto(DeviceId, file, messageThreadId: null, caption: caption, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -392,8 +391,8 @@ public class DeviceSession : IDeviceSession
|
||||
InlineKeyboardMarkup markup = buttons;
|
||||
|
||||
|
||||
var t = Api(a => a.SendVideoAsync(DeviceId, file, caption: caption, parseMode: parseMode,
|
||||
replyToMessageId: replyTo, replyMarkup: markup,
|
||||
var t = Api(a => a.SendVideo(DeviceId, file, caption: caption, parseMode: parseMode,
|
||||
replyParameters: replyTo, replyMarkup: markup,
|
||||
disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -422,8 +421,8 @@ public class DeviceSession : IDeviceSession
|
||||
InlineKeyboardMarkup markup = buttons;
|
||||
|
||||
|
||||
var t = Api(a => a.SendVideoAsync(DeviceId, InputFile.FromUri(url), parseMode: parseMode,
|
||||
replyToMessageId: replyTo, replyMarkup: markup,
|
||||
var t = Api(a => a.SendVideo(DeviceId, InputFile.FromUri(url), parseMode: parseMode,
|
||||
replyParameters: replyTo, replyMarkup: markup,
|
||||
disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -457,7 +456,7 @@ public class DeviceSession : IDeviceSession
|
||||
|
||||
var fts = InputFile.FromStream(ms, filename);
|
||||
|
||||
var t = Api(a => a.SendVideoAsync(DeviceId, fts, parseMode: parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendVideo(DeviceId, fts, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -494,7 +493,7 @@ public class DeviceSession : IDeviceSession
|
||||
|
||||
var fts = InputFile.FromStream(fs, filename);
|
||||
|
||||
var t = Api(a => a.SendVideoAsync(DeviceId, fts, parseMode: parseMode, replyToMessageId: replyTo,
|
||||
var t = Api(a => a.SendVideo(DeviceId, fts, parseMode: parseMode, replyParameters: replyTo,
|
||||
replyMarkup: markup, disableNotification: disableNotification));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
@@ -573,8 +572,8 @@ public class DeviceSession : IDeviceSession
|
||||
}
|
||||
|
||||
|
||||
var t = Api(a => a.SendDocumentAsync(DeviceId, document, null, null, caption, replyMarkup: markup,
|
||||
disableNotification: disableNotification, replyToMessageId: replyTo));
|
||||
var t = Api(a => a.SendDocument(DeviceId, document, messageThreadId: null, thumbnail: null, caption: caption, replyMarkup: markup,
|
||||
disableNotification: disableNotification, replyParameters: replyTo));
|
||||
|
||||
var o = GetOrigin(new StackTrace());
|
||||
await OnMessageSent(new MessageSentEventArgs(await t, o));
|
||||
@@ -772,11 +771,11 @@ public class DeviceSession : IDeviceSession
|
||||
|
||||
#region "Users"
|
||||
|
||||
public virtual async Task RestrictUser(long userId, ChatPermissions permissions, bool? useIndependentGroupPermission = null, DateTime until = default)
|
||||
public virtual async Task RestrictUser(long userId, ChatPermissions permissions, bool useIndependentGroupPermission = false, DateTime until = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
await Api(a => a.RestrictChatMemberAsync(DeviceId, userId, permissions, useIndependentGroupPermission, until));
|
||||
await Api(a => a.RestrictChatMember(DeviceId, userId, permissions, useIndependentChatPermissions: useIndependentGroupPermission, untilDate: until));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user