public async Task <bool> RefreshInlineMessage(List <Instance> instances, long currentBotChatID, ContentParts content, ContentParts contentChannel, string currentInlineMessageID = null)
        {
            Instance currentInstance          = instances.Find(x => x.chatID == currentBotChatID);
            bool     inlineMessageEditSuccess = false;

            try {
                if (currentInlineMessageID != null)
                {
                    MessageID currentMessageID = messageIds.Find(x => x.inlineMessageId == currentInlineMessageID);
                    if (currentMessageID.messageIDInvalid)
                    {
                        throw new UpdateMessageIDInvalidException();
                    }
                    else if (currentMessageID.botChatID == currentBotChatID)
                    {
                        ContentParts contentToSend = currentMessageID.channel ? contentChannel : content;
                        if (RequestHandler.DoUpdate(instance: currentInstance, messageID: currentMessageID, messageTextLength: content.Text.Length, necessary: true))
                        {
                            try {
                                await Api.EditMessageTextAsync(
                                    currentInstance.apikey,
                                    contentToSend.Text,
                                    contentToSend.InlineKeyboard,
                                    inlineMessageID : currentMessageID.inlineMessageId
                                    );

                                inlineMessageEditSuccess = true;
                            } catch (WJClubBotFrame.Exceptions.MessageIDInvalid) {
                                currentMessageID.messageIDInvalid = true;
                            } catch (WJClubBotFrame.Exceptions.TooManyRequests ex) {
                                currentInstance.retryAt = DateTime.Now + TimeSpan.FromSeconds(ex.RetryAfter);
                            }
                        }
                        else
                        {
                            if (RequestHandler.DoUpdate(instance: currentInstance, messageTextLength: content.Text.Length))
                            {
                                throw new InstanceAtFullCapacity();
                            }
                            else if (RequestHandler.DoUpdate(messageID: currentMessageID, messageTextLength: content.Text.Length))
                            {
                                throw new MessageIDAtFullCapacity();
                            }
                            else
                            {
                                //TODO This can only happen if the last request was on point one unit away and the clock has moved a tiny bit, maybe solve this differently
                                throw new UnknownFullCapacity();
                            }
                        }
                    }
                    else
                    {
                        throw new UpdateBotsDontMatchException();
                    }
                }
            } finally {
                //Todo figure this out

                /*
                 * dBHandler.UpdateQueue.Add(new UpdateQueueObject {
                 *      poll = this,
                 *      priorityUpdates = inlineMessageEditSuccess ? new List<string> { currentInlineMessageID } : new List<string>(),
                 *      doneUpdates = new List<string>(),
                 *      important = false,
                 *      fromBotID = currentBotChatID,
                 * });*/
            }
            return(inlineMessageEditSuccess);
        }
 public void AddToMessageIDs(MessageID messageID)
 {
     messageIds.Add(messageID);
     dBHandler.AddToQueue(this, false);
 }