docs: public static User getUser(Update update) {
      if (MESSAGE.test(update)) {
        return update.getMessage().getFrom();
      } else if (CALLBACK_QUERY.test(update)) {
        return update.getCallbackQuery().getFrom();
      } else if (INLINE_QUERY.test(update)) {
        return update.getInlineQuery().getFrom();
      } else if (CHANNEL_POST.test(update)) {
        return update.getChannelPost().getFrom();
      } else if (EDITED_CHANNEL_POST.test(update)) {
        return update.getEditedChannelPost().getFrom();
      } else if (EDITED_MESSAGE.test(update)) {
        return update.getEditedMessage().getFrom();
      } else if (CHOSEN_INLINE_QUERY.test(update)) {
        return update.getChosenInlineQuery().getFrom();
      } else {
        throw new IllegalStateException("Could not retrieve originating user from update");
      }
    }