Ejemplo n.º 1
0
        public async Task ForwardHashtag(string hashtag)
        {
            var found = await _db.GetBookmarkByHashtag(_message.Chat.Id, hashtag);

            if (found == null)
            {
                _log.Ignore("Hashtag {0} tidak ada!", hashtag);
                await SendCallbackResponse($"Bookmark #{hashtag} yang dicari tidak ada!", true);

                return;
            }

            var forward = await BotClient.ForwardMessageAsync(_message.Chat.Id, found.ChatId, found.MessageId);

            if (forward == null)
            {
                _log.Ignore("Hashtag {0} tidak bisa diforward!", hashtag);
                await SendCallbackResponse($"Bookmark #{hashtag} pesenan kaka gak bisa diforward 😔", true);

                return;
            }

            await SendCallbackResponse($"Hashtag #{hashtag} pesenan kaka udah tak siapin..", true);

            await BotClient.SendTextAsync(_message.Chat.Id,
                                          $"Ini pesenan kak {_message.FromNameWithMention(ParseMode.Html)}, yg cari hashtag {hashtag}",
                                          forward.MessageId, ParseMode.Html);
        }