예제 #1
0
        private static async Task ForceCheckInviteLinksAsync(TelegramBotAbstract sender, MessageEventArgs e)
        {
            int?n = null;

            try
            {
                n = await InviteLinks.FillMissingLinksIntoDB_Async(sender, e);
            }
            catch (Exception e2)
            {
                await NotifyUtil.NotifyOwners(new ExceptionNumbered(e2), sender);
            }

            if (n == null)
            {
                return;
            }

            var text2 = new Language(new Dictionary <string, string>
            {
                { "en", "I have updated n=" + n + " links" },
                { "it", "Ho aggiornato n=" + n + " link" }
            });
            await SendMessage.SendMessageInPrivate(sender, e.Message.From.Id,
                                                   e.Message.From.LanguageCode,
                                                   e.Message.From.Username, text2,
                                                   ParseMode.Default,
                                                   e.Message.MessageId);
        }
        private static async Task ForceCheckInviteLinksAsync(TelegramBotAbstract sender, MessageEventArgs e)
        {
            var n = await InviteLinks.FillMissingLinksIntoDB_Async(sender);

            var text2 = new Language(new Dictionary <string, string>
            {
                { "en", "I have updated n=" + n + " links" },
                { "it", "Ho aggiornato n=" + n + " link" }
            });
            await SendMessage.SendMessageInPrivate(sender, e, text2);
        }